Safe SVG
By 10up
Description
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 are 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 include sanitised SVGs to prevent security holes, SVGO optimisation to save space, and the ability to restrict SVG uploads to certain users. This plugin ensures that your WordPress site remains secure while enabling the use of SVG files.
Other Notable Features
Here are a few other notable features of this free Safe SVG plugin.
FAQ
Yes, this can be done using the svg_allowed_attributes and svg_allowed_tags filters.
They take one argument that must be returned. See below for examples:
add_filter( 'svg_allowed_attributes', function ( $attributes ) { // Do what you want here... // This should return an array so add your attributes to // to the $attributes array before returning it. E.G. $attributes[] = 'target'; // This would allow the target="" attribute. return $attributes; } ); add_filter( 'svg_allowed_tags', function ( $tags ) { // Do what you want here... // This should return an array so add your tags to // to the $tags array before returning it. E.G. $tags[] = 'use'; // This would allow the <use> element. return $tags; } ); Contributors and developers
“Safe SVG” is open source software. The following people have contributed to this plugin.
WPS
6.99
Average
Ratings
4.9 out of 5 | 76Version
2.4.0Last updated
3 weeks agoActive installations
1,000,000+WordPress version
6.9 or higherPHP version
7.4 or higherLanguages
30Tags
Media,Mime,Security,SVG,VectorOther plugins you might like
Wordfence Security – Firewall, Malware Scan, and Login Security
By Mark Maunder
WPS
7.6
Very Good
4.8k+reviews
active installation
Tested with
6.9Really Simple Security – Simple and Performant Security (formerly Really Simple SSL)
By Really Simple Plugins
WPS
7.67
Very Good
8.8k+reviews
active installation
Tested with
6.9Jetpack – WP Security, Backup, Speed, & Growth
By Automattic
WPS
7.63
Very Good
2.4k+reviews
active installation
Tested with
6.9WPS Hide Login
By Remy Perona
WPS
7.43
Very Good
2.1k+reviews
active installation
Tested with
6.9Limit Login Attempts Reloaded – Login Security, Brute Force Protection, Firewall
By WPChef
WPS
7.46
Very Good
1.4k+reviews
active installation
Tested with
6.9Cookie Notice & Compliance for GDPR / CCPA
By Humanityco
WPS
7.04
Very Good
3k+reviews
active installation
Tested with
6.9