SVG is a vector file and may have security issues if you not downloaded it from a trusted source. WordPress does not allow to upload SVG 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 ways to upload SVG files to your WordPress website or blog.

1. SVG Support
It’s a free plugin in the WordPress repository. There is nothing crazy settings in this plugin. Just install & activate the SVG Support plugin, and you will be able to upload SVG files to your WordPress site.

However, we suggest you enable one option in Settings. It’s “Restrict to Administrators” and enabling this option will only allow your website administrators to upload SVG files. Otherwise, other users will be able to upload SVG files as well. For example- Editor, Author, etc.

You will find this option in Settings => SVG Support.
This plugin has 500,000+ active installations and great reviews. It’s very lightweight plugin and it has not impact on your website loading time/speed.
However, if you’re still not able to upload SVG files, then go to “Media => Add New” to upload files.
2. Safe SVG
It’s another plugin that will also allow WordPress to enable SVG support and sanitize XML vulnerabilities.
This plugin does not require any setup or configuration. Just plug & play.
It has more than 400,000 active installation with good reviews.
There are other WordPress plugins but we found these two very useful. Specially 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 comparing to JPG & PNG. These are the main reasons people like SVGs.
Difference between SVG & JPG/PNG
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.
Since SVG contains XML code, so it also may have vulnerabilities for security reasons. It’s totally normal to use SVGs if you created it yourself or if you downloaded it form trusted source.
Though the above plugins will sanitize your SVG files before uploading them to the media library. Therefore it’s always better to not download from an unauthenticated source and upload it to your site.

Hope that makes sense. And now you are able to upload SVG files on your WordPress website.
Let us know if it really solved your issue or if you still have problem.
Are you tired of removing spam comments on your WordPress site? Learn the easiest way of preventing spam comments.