SVG is a vector file and may have security issues if you have not downloaded it from a trusted source. WordPress does not allow to upload of SVG files by default. And you may get an error while trying to upload SVG in WordPress Media Library: “Sorry, this file type is not permitted for security reasons.”
In this post, we will show you two different plugins and troubleshoot if you still have any issues while uploading SVG files.
1. SVG Support WordPress plugin
Are you still struggling uploading SVG files even after activating the WordPress SVG Support plugin? See the next section to make it work differently.
It’s a free plugin in the WordPress repository. There is nothing crazy settings in this plugin. Just install & activate the plugin, and you will be able to upload SVG files to your WordPress site. If you don’t know, learn how to install a WordPress plugin.
However, I suggest you enable one option in Settings. It’s “Restrict to Administrators” and enabling this option will only allow the administrators to upload SVG files. Otherwise, everyone will be able to upload SVG files. For example- Editor, Author, etc. But if it’s okay for you, then leave this setting as it is.
You will find this option in Settings => SVG Support.
This plugin has 500,000+ active installations and great reviews. It’s a very lightweight plugin and it has no impact on your website loading time/speed.
WordPress SVG support not working [Do it differently]
Still not able to upload SVG files? See the video instructions below for more help.
If you see the WordPress SVG support plugin still not working and if you’re unable to insert SVG files even after activating the plugin, then navigate to “Media » Add New” and upload the SVG files. And then go back to your post or pages and select the file that you want.
This is just because sometimes your current setup may not allow uploading SVGs direct from the post or page.
So if the SVG support plugin is not working as expected in your WordPress installation, then follow the above method in order to make it work.
2. Safe SVG WordPress plugin
Currently, this plugin is not maintained by the developer and also he has not updated the plugin for the last 2 years (2022). But it still works.
If you already have tried the first plugin and failed to make it work, you may give it a try.
It’s another plugin that will help you to upload SVG files and sanitize XML vulnerabilities.
This plugin does not require any setup or configuration. Just plug & play.
It has more than 400,000 active installations with good reviews.
FAQ & Troubleshoot
If you’re not able to upload SVG files after activating the “SVG Support” plugin, do the following:
Navigate to the “Media » Library » Add New” and upload your file.
Once it has been uploaded to the media library, go to edit any post or page and now you will be able to insert the SVG files. For more clarifications, see the video instructions above (middle of the page).
Because of security reasons. Since the SVG file contains scripts (XML code), so there is a chance to inject bad code. And by using an insecure SVG file, your website will have vulnerabilities.
This is the reason for WordPress is not allowing SVG file upload by default.
It’s totally normal to use SVGs if you created them yourself or if you downloaded them from a trusted source.
In my opinion & based on practical use cases, I found the “SVG Support” very handy.
However, I mentioned two WordPress plugins for SVG upload. There are other plugins but I found these two very useful. Especially these two plugins don’t need any critical configuration or manual work.
SVG stands for Scalable Vector Graphics. It is very small in file size but too much crisp & clear. And even it does not become blurry in large screen sizes.
SVG file loads very fast compared to JPG & PNG. These are the main reasons people like SVGs.
SVG files are vector-based.
On the other hand, JPG & PNG files are pixel-based.
For example- you can think of the difference between Adobe Illustrator & Photoshop.