Safe SVG

safe-svg · By 10up
1M+ installs 4.9 (79) Updated 1 week ago v2.5.2 WP 6.9–7.1.4 PHP 7.4+

Impact score

Footprint Score across the two most representative contexts.

2 scans · last scan 1 week ago

Compare with another plugin

Homepage Score

Impact measured on the public homepage

···
—

v2.5.2 · 1 scan · Consolidated score over 90 days · 1 versions

Not enough data to publish the grade (15 scans min, currently 1).

What it adds to every page load

Added time
216 ms
Added memory
0.0 MB
SQL queries
+0
CSS/JS files
+0
External calls
0

Admin Score

Impact measured in the WordPress admin

Scan being analyzed. The score will be published once we have enough measurements.

About

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.

Initially a proof of concept for #24251.

Read more

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.

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.

Description published by 10up on WordPress.org, licensed under GPL-2.0-or-later.

Tags
media mime security SVG Vector

Per-version history

Show per-version detail (1 version)

How the plugin evolves version by version.

Version Homepage Admin Last scan
v2.5.2 1 scan — 1 week ago

Alternatives in the same category

Other security plugins measured by the community, ranked from lightest to heaviest.

Scan history

Show individual scan log (1 scans)

Date Version Context Score Grade Time Memory
1 week ago v2.5.2 Homepage 100/100 A 216 ms 0.0 MB