Intermediate Standard

How to use SVG images in WordPress

By Angus Published 14 May 2026 2 min read

WordPress does not allow SVG file uploads by default, treating them as a security risk because SVGs can contain embedded scripts. The Safe SVG plugin sanitises SVG files on upload, removing potentially harmful code so you can use them safely through the Media Library.

SVG files are vector-based, meaning they scale to any size without losing quality. For logos and simple graphics, they are often smaller in file size than a JPG or PNG of equivalent dimensions, which can improve page load times.

Before you begin

  • You need to be logged in to WordPress as an Administrator, or have a role with permission to install plugins.
  • We recommend creating a backup of your WordPress site before installing new plugins.

Install the Safe SVG plugin

The Safe SVG plugin adds SVG support to WordPress by sanitising each file as it is uploaded. This removes any embedded scripts or malicious markup before the file is stored, so your site is not exposed to SVG-based attacks.

  1. Go to the Add Plugins screen.
    In the WordPress admin sidebar, hover over Plugins and click Add New Plugin.
  2. Search for Safe SVG.
    Type Safe SVG into the search field. The plugin by 10up should appear at or near the top of the results.
  3. Install the plugin.
    Click Install Now on the Safe SVG plugin card. WordPress will download and install it automatically.
  4. Activate the plugin.
    Once installation is complete, click Activate. The plugin requires no additional configuration.
WordPress plugin search results showing the Safe SVG plugin by 10up
The Safe SVG plugin in the WordPress plugin directory.

SVG uploads are now enabled. You can upload .svg files through Media > Add New and insert them into pages and posts as you would any other image.

Wrapping up

You installed and activated the Safe SVG plugin, which allows WordPress to accept SVG file uploads through the Media Library. Files are sanitised automatically on upload, so embedded scripts are stripped before the file is stored.

With SVG support active, you can upload your logo, icons and other vector graphics and insert them anywhere on your site. For further WordPress maintenance tasks, see our guides on removing malware from WordPress and disabling plugins using WP Toolkit. You may also find the security risks that plugins can introduce worth reading before adding further plugins to your site.

Our WordPress hosting plans include WP Toolkit, giving you a central place to manage plugins, themes and updates across your sites.

Running a WordPress site?

Get fast, secure and reliable WordPress Hosting with optimised for performance with AccelerateWP.

Get WordPress Hosting

Need multiple accounts?

Create fully isolated individual accounts for your clients and manage them all from one dashboard.

Get Reseller Hosting