Add SVG support to your WP website. Securely upload SVG files, automatic sanitization, Media Library preview.
Securely upload SVG files to your Media Library. Uploaded SVG files are automatically sanitized.
SVG stands for Scalable Vector Graphics and is probably the most efficient way to display images.
WP SVG Images Plugin is an easy-to-use and lightweight plugin that allows you to upload SVG files to your media library safely and easily.
24/7 SVG support offered by ShortPixelhere or here.
This plugin is supported & maintained by ShortPixel.
Other popular plugins by ShortPixel:
FastPixel Caching – WP Optimization made easy
ShortPixel Image Optimizer – Image optimization & compression for all the images on your website, including WebP delivery – ShortPixel Image Optimizer.
ShortPixel Adaptive Images – On-the-fly image optimization & CDN delivery.
Enable Media Replace – Easily replace images or files in Media Library.
reGenerate Thumbnails Advanced – Easily regenerate thumbnails.
Resize Image After Upload – Automatically resize each uploaded image.
Allows you to specify more tags that will be not removed during sanitization
add_filter( 'WPSVG_setAllowedTags', 'my_custom_allowed_svg_tags', 10, 1 ); function my_custom_allowed_svg_tags( $tags ){ $tags[] = 'path'; return $tags; }
Allows you to specify more attributes that will be not removed during sanitization
add_filter( 'WPSVG_setAllowedAttrs', 'my_custom_allowed_svg_attributes', 10, 1 ); function my_custom_allowed_svg_attributes( $attributes ){ $attributes[] = 'fill'; return $attributes; }
wp-svg-images
directory to the /wp-content/plugins/
directoryRelease date: June 20th, 2024
* Fix: Patched a Stored Cross-Site Scripting vulnerability found by Colin Xu and responsibly disclosed by the WordFence team;
* Compat: Added compatibity with WP All Import plugin;
* Compat: Tested with the latest versions of WordPress (6.6) and PHP (8.3).
Release date: April 6th, 2023
* Compat: Tested on WordPress 6.2;
* Compat: Updated SVG sanitizer scripts;
* Tweak: Skip percentage width and height when reading SVG dimensions.
Release date: August 1st, 2022
* Tweak: auto hide the settings notice after visiting the settings page;
* Compat: tested the compatibility with WordPress 6.0;
* Fix: the settings link and button from the notice now work fine on all WordPress installs.
Release date: March 29th, 2022
* New: joined the ShortPixel family;
* New: added SVG sanitization;
* New: added settings page where you can enable/disable SVG upload per user role;
* Compat: deprecated WP_SVG_FOR_EVERYONE
.