S
Media & Galleries Free WordPress.org

Safe SVG

4.9 (78 reviews)
· 1.0M+ active installs · By 10up
Active Installs
1.0M+
Rating
4.9 / 5
Version
v2.4.0
Last Updated
Apr 2026
Share

Plugin Review

AI-Researched

What is Safe SVG?

Safe SVG is a WordPress plugin that enables SVG file uploads while protecting your site from XML-based security threats. Developed by 10up, a respected agency in the WordPress ecosystem, it has been actively maintained for 11 years. The plugin currently has over 1 million active installs and holds a 4.9 out of 5 star rating from 78 reviews. A full 90% of those reviews are five-star, with zero one-star ratings recorded.

The plugin sanitizes every SVG file during upload to strip out potentially harmful code. It started as a proof of concept for WordPress core ticket #24251. SVG sanitization is handled through the darylldoyle/svg-sanitizer library. Optimization is powered by the svg/svgo tool, which is disabled by default but available for advanced users.

Key Features of Safe SVG

  • Sanitized SVGs – Every uploaded SVG is cleaned of dangerous XML and script elements before it reaches your media library.
  • SVGO Optimization – Reduces SVG file size on upload by running files through the SVGO tool, activated via a code filter.
  • Media Library Previews – SVGs display as visual thumbnails in all media library views, ending the guesswork of file selection.
  • User Role Restrictions – Limit SVG upload permissions to specific user roles or allow uploads for all logged-in users.
  • Custom Allowed Attributes – Extend the default set of permitted SVG attributes using the svg_allowed_attributes filter.
  • Custom Allowed Tags – Add or remove SVG elements like <use> via the svg_allowed_tags filter.
  • MIME Type Support – Registers the SVG MIME type with WordPress so the system recognizes vector files correctly.
  • Long-Term Compatibility – Requires WordPress 6.6+ and PHP 7.4+, ensuring it works with modern hosting environments.

Who Should Use Safe SVG?

This plugin suits site owners who need to upload logos, icons, or illustrations in vector format. It is ideal for beginners because it works immediately after activation with no configuration required. The 1 million active installs confirm it is trusted by a wide range of users, from personal blogs to large editorial sites. Designers and developers benefit from the sanitization layer, which prevents SVG-based cross-site scripting attacks.

Advanced users can enable SVGO optimization by adding one line of code to their theme or plugin. The custom attribute and tag filters give developers fine-grained control over which SVG features are allowed. Sites with multiple authors can restrict upload permissions to specific roles, reducing risk from untrusted contributors. The plugin’s 11-year history and 4.9 rating indicate it is a stable choice for production environments.

Installation & Setup

Install Safe SVG through the WordPress plugin directory or by uploading the unzipped folder to /wp-content/plugins/. After activation, SVG uploads are immediately available to users with file upload permissions. No settings pages or configuration steps are required, making it accessible for users at any skill level.

Support & Community

Support data from the last two months shows 1 open thread and 0 resolved threads, resulting in a 0% resolution rate. This is a notable data point for a plugin with 1 million active installs. The ratings picture is more positive: 90% of 78 reviews are five-star, and no one-star reviews exist. The plugin’s long development history and 10up’s reputation suggest that most users find it reliable out of the box. The low support activity may indicate that the plugin requires minimal assistance after setup.

Pros & Cons

What's Good
  • Over 1 million active installs and a 4.9/5 rating from 78 reviews indicate high user satisfaction and trust.
  • Built-in SVG sanitization via a dedicated library prevents XML-based vulnerabilities, addressing a key security risk of allowing SVG uploads.
  • SVG previews in the media library eliminate guesswork, saving time when selecting files across all view modes.
  • Optional SVGO optimization, enabled with a single filter, reduces file sizes to save storage space without altering the plugin’s core functionality.
  • Role-based upload restrictions let site owners limit SVG uploads to specific user groups, adding granular control over who can introduce vector files.
Drawbacks
  • SVGO optimization is disabled by default and requires custom code to activate, which may deter non-technical users from using it.
  • The plugin has only 1 support thread with a 0% resolution rate, suggesting minimal or no active support for troubleshooting.
  • Sanitization may strip valid SVG elements or attributes, potentially breaking complex or custom-coded vector graphics during upload.

Technical Details

Requires WordPress
6.6+
Requires PHP
7.4+
Tested up to WP
7.0
First Released
2015 (11+ years)
Support (last 2 months)
0 threads

Feature Tags

media mime security svg vector

Frequently Asked Questions