WPThumbs
Themes Plugins By purpose By industry Best-of lists Fix it guides
Free Plugin by 10up v2.4.0

Safe SVG

Enable SVG uploads and sanitize them to stop XML/SVG vulnerabilities in your WordPress website.

Safe SVG

The facts

Rating
4.9★ from 79
Active installs
1M+
Price
Free
Last updated
20 Aug 2026
Added
Jul 2015
Requires WP
6.6
Tested up to
WP 7.1
Requires PHP
7.4
Downloads
13,328,377

Our analysis

AI-assisted

Safe SVG is a WordPress plugin that allows you to upload SVG files while ensuring they are sanitized to prevent vulnerabilities. It provides features such as SVG previews in the media library and the option to restrict uploads to specific users.

This plugin is suitable for users who want to incorporate SVG graphics into their WordPress sites without compromising security. It is particularly useful for developers and site administrators who need to manage file uploads effectively.

Best for: This plugin is best for WordPress users who need to safely manage SVG uploads.

What it does well

  • Sanitizes SVG files to prevent security vulnerabilities
  • Enables SVG previews in the media library
  • Allows restriction of SVG uploads to certain users
  • Uses established libraries for sanitization and optimization
  • Free to use from the WordPress.org directory

Where it falls short

  • No information on additional features or support
  • SVGO optimization is disabled by default

Verdict

Safe SVG offers essential security features for handling SVG files in WordPress. It is a practical choice for those looking to enhance their site's media capabilities while maintaining security.

From the developer

10up's own description of Safe SVG, lightly tidied.

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.

Read the full description on the official page →

Tagged as

Alternatives

Other plugins for securing a site.

Really Simple Security

Easily improve site security with WordPress Hardening, Two-Factor Authentication (2FA), Login Protection, Vuln...

Free 3M+ installs 4.9★ (8,862)
Wordfence Security

Firewall, Malware Scanner, Two Factor Auth, and Comprehensive Security Features, powered by our 24-hour team....

Free 5M+ installs 4.7★ (4,983)
Akismet Anti-spam: Spam Protection

The best anti-spam protection to block spam comments and spam in a contact form. The most trusted antispam sol...

Free 5M+ installs 4.7★ (1,186)
Loginizer

Loginizer is a WordPress security plugin which helps you fight against bruteforce attacks.

Free 1M+ installs 4.8★ (1,030)
All-In-One Security

Protect your website investment with All-In-One Security (AIOS) – a comprehensive and easy to use security plu...

Free 1M+ installs 4.7★ (1,715)