Home » WordPress » Proper Way To Enable SVG Option in WordPress

Proper Way To Enable SVG Option in WordPress

In WordPress, by default SVG option is disabled due to security reasons. Apart from that, well known all the images are supports in WordPress Media like .png, .jpg, .jpeg, and .gif. In the latest trend, everyone loves Scalable Vector Graphics (SVG) because of lite weight with high resolution.

If you try to upload the SVG image and you get an error message like Sorry, this file type is not permitted for security reasons? then to solve this issue you need to use custom code in your functions.php and wp-config.php file. Use the below code to enable the SVG option on the WordPress website.

Use the below code in your functions.php to enable media access from the SVG file select.

Define the below code in your wp-config.php to allow access for SVG file upload to your media folder.

Note: By allowing unfiltered uploads maybe cause a security problem.

Output for Uploaded SVG file without plugin

Output for Uploaded SVG file without plugin

Enable SVG File Option Using the WordPress Plugin

An easy way to enable the SVG file option is plugins with the one-click installation of SVG plugin you can enable and upload the SVG files. The only disadvantage, this may increase the extra weight of your website.

Recommended below SVG Support plugin, this helps with the one-click installation to activate the SVG file option.

Enable SVG File option using the WordPress plugin

Conclusion: I hope anyone this option will help you to solve this SVG file support problem for your WordPress website. If you are newer to WordPress, you can use the plugin but if your developer better you can use the custom code. If you loved this article share it with your friends.

Was this article helpful?

Yes No
×

How can we improve it?

×

We appreciate your helpul feedback!

Your answer will be used to improve our content. The more feedback you give us, the better our pages can be.

Follow us on social media:

Facebook Pinterest

Mraj

Creative Designer & Developer specialist by the spirit and a loving blogger by thoughts.

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top