← Free Plugins

Safe SVG

Free WordPress plugin by 10up

★★★★★ 4.9 · 79 ratings · 1M+ active installs

Safe SVG is the best way to Allow SVG Uploads in WordPress! It gives you the ability to allow SVG uploads whilst making sure that they’re sanitized to stop SVG/XML vulnerabilities affecting your site…

1M+ active installs v2.5.2 latest version 26 Oct 2026 last updated 3 Jul 2015 added 79 ratings

About Safe SVG

Safe SVG 2.5.2 is a free WordPress plugin by 10up. It is rated 4.9 out of 5 from 79 ratings and is active on 1M+ WordPress sites. The latest version is 2.5.2, last updated on 26 Oct 2026. You can download it free from WordPress.org — no account or payment needed.

Safe SVG is the best way to Allow SVG Uploads in WordPress!

It gives you the ability to allow SVG uploads whilst making sure that they’re sanitized to stop SVG/XML vulnerabilities affecting your site. It also gives you the ability to preview your uploaded SVGs in the media library in all views.

Current Features

  • Sanitised SVGs – Don’t open up security holes in your WordPress site by allowing uploads of unsanitised files.
  • SVGO Optimisation – Runs your SVGs through the SVGO tool on upload to save you space. This feature is disabled by default but can be enabled by adding the following code: add_filter( 'safe_svg_optimizer_enabled', '__return_true' );
  • View SVGs in the Media Library – Gone are the days of guessing which SVG is the correct one, we’ll enable SVG previews in the WordPress media library.
  • Choose Who Can Upload – Restrict SVG uploads to certain users on your WordPress site or allow anyone to upload.

Initially a proof of concept for #24251.

SVG Sanitization is done through the following library: https://github.com/darylldoyle/svg-sanitizer.

SVG Optimization is done through the following library: https://github.com/svg/svgo.

Technical: Upload Path Security

WordPress’s _wp_handle_upload( $file, $action ) function allows any $action value, which determines the filter hook name: {$action}_prefilter. Safe SVG hooks common actions like wp_handle_upload and wp_handle_sideload, but cannot hook arbitrary custom actions defined by third-party code. Since upload actions are unbounded and MIME allowances are global, we cannot guarantee sanitization coverage across all possible upload paths.

Questions about Safe SVG

Is Safe SVG free?

Yes. Safe SVG is free to download and use from the official WordPress.org directory. There is no payment and no account needed — the download on this page goes straight to WordPress.org.

What is the latest version of Safe SVG?

The latest version is 2.5.2, last updated on 26 Oct 2026.

How popular is Safe SVG?

It is rated 4.9 out of 5 from 79 ratings and is active on 1M+ WordPress sites.

How do I install Safe SVG?

From your WordPress dashboard, go to Plugins → Add New, search for Safe SVG, then Install and Activate. You can also download the ZIP from WordPress.org and upload it under Plugins → Add New → Upload Plugin.

Where do I download Safe SVG?

Directly from WordPress.org. The Download button on this page goes straight to the official WordPress.org download, and GPLWPClub does not store the file.

Tags

mediamimesecuritySVGVector