Title: WP SVG Images
Author: ShortPixel
Published: <strong>August 26, 2016</strong>
Last modified: December 10, 2025

---

Search plugins

![](https://ps.w.org/wp-svg-images/assets/banner-772x250.png?rev=2701394)

![](https://ps.w.org/wp-svg-images/assets/icon.svg?rev=2701394)

# WP SVG Images

 By [ShortPixel](https://profiles.wordpress.org/shortpixel/)

[Download](https://downloads.wordpress.org/plugin/wp-svg-images.4.4.zip)

 * [Details](https://wordpress.org/plugins/wp-svg-images/#description)
 * [Reviews](https://wordpress.org/plugins/wp-svg-images/#reviews)
 *  [Installation](https://wordpress.org/plugins/wp-svg-images/#installation)
 * [Development](https://wordpress.org/plugins/wp-svg-images/#developers)

 [Support](https://wordpress.org/support/plugin/wp-svg-images/)

## Description

**Securely upload SVG files to your Media Library. Uploaded SVG files are automatically
sanitized.**

SVG stands for [Scalable Vector Graphics](https://en.wikipedia.org/wiki/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.

#### Features

 * Support for SVG uploads to your Media Library.
 * Sanitize uploaded SVG files. Malicious SVG/XML files are rejected from upload.
 * Admin configurable SVG support for different user roles. Ability to disable SVG
   upload for different user roles.
 * Different user roles can upload and/or sanitize the uploaded SVG images.
 * SVG preview in Media Library.

#### Support

24/7 SVG support offered by [ShortPixel](https://shortpixel.com) [here](https://shortpixel.com/contact)
or [here](https://wordpress.org/support/plugin/wp-svg-images/).

#### Recommended plugins

This plugin is supported & maintained by [ShortPixel](https://shortpixel.com/).

Other popular plugins by ShortPixel: [FastPixel Caching](https://wordpress.org/plugins/fastpixel-website-accelerator/)–
WP Optimization made easy [ShortPixel Image Optimizer](https://wordpress.org/plugins/shortpixel-image-optimiser/)–
Image optimization & compression for all the images on your website, including WebP
delivery – ShortPixel Image Optimizer. [ShortPixel Adaptive Images](https://wordpress.org/plugins/shortpixel-adaptive-images/)–
On-the-fly image optimization & CDN delivery. [Enable Media Replace](https://wordpress.org/plugins/enable-media-replace/)–
Easily replace images or files in Media Library. [reGenerate Thumbnails Advanced](https://wordpress.org/plugins/regenerate-thumbnails-advanced/)–
Easily regenerate thumbnails. [Resize Image After Upload](https://wordpress.org/plugins/resize-image-after-upload/)–
Automatically resize each uploaded image.

### Hooks for developers

#### WPSVG_setAllowedTags

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;
    }
    ```

#### WPSVG_setAllowedAttrs

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;
    }
    ```

## Installation

 1. Upload `wp-svg-images` directory to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress

## Reviews

![](https://secure.gravatar.com/avatar/cee994e79252db6cb55602b7cfa2bff6cc52d17e0e6233737a4ce4404cab9550?
s=60&d=retro&r=g)

### 󠀁[Works just as expected](https://wordpress.org/support/topic/works-just-as-expected-13/)󠁿

 [solanum](https://profiles.wordpress.org/solanum/) July 30, 2024 1 reply

Great plugin! No problems, works just fine 🙂

![](https://secure.gravatar.com/avatar/6999b13a8eb0853dc5f4158e31d8c0579ff3eba2f1b590992cca30bf1f585401?
s=60&d=retro&r=g)

### 󠀁[The best](https://wordpress.org/support/topic/the-best-2079/)󠁿

 [DesignPuma](https://profiles.wordpress.org/designpuma/) June 8, 2021

I tried a lot of plugins for SVG images, but none is good like this plugin. Greets
to author, very powerful plugin. Especially is good for SVG width and height, it’s
automatically set the width and high of SVG images. Thanks!

![](https://secure.gravatar.com/avatar/4199381a7965b2a2d113bbf5e9138d25a3d1b9b1229ec1b3140fae31e2abe738?
s=60&d=retro&r=g)

### 󠀁[Thanks for time saving and lightweight plugin](https://wordpress.org/support/topic/thanks-for-time-saving-and-lightweight-plugin-2/)󠁿

 [heitz](https://profiles.wordpress.org/heitz/) April 23, 2021

no words only tears of gratitude

![](https://secure.gravatar.com/avatar/945f3e77f603bfd1e9230895add3b2ce5384055b20a08fe7f79d4acd0809b8d7?
s=60&d=retro&r=g)

### 󠀁[Thanks for time saving and lightweight plugin](https://wordpress.org/support/topic/thanks-for-time-saving-and-lightweight-plugin/)󠁿

 [rolandassisla](https://profiles.wordpress.org/rolandassisla/) October 30, 2020

I was looking all day for a replacement for Safe SVG.

![](https://secure.gravatar.com/avatar/f6bfee616f27a5dc09d2af8d7ebf86894881ed15d98fbae6a927aee1f855d505?
s=60&d=retro&r=g)

### 󠀁[ABSOLUTELY a lifesaver](https://wordpress.org/support/topic/absolutely-a-lifesaver/)󠁿

 [thinkthendo](https://profiles.wordpress.org/thinkthendo/) March 20, 2020

I tested out a few other SVG plugins….they either were ineffective, mildly buggy,
or crashed my site. THIS plugin though…is not just stable, but it operates smoothly.
And it is also not a resource hog. It is wonderful. I currently have he latest version
of WordPress — 5.3.2 — and it works just fine, as of today. I have ajax, jquery,
CSS, PHP…basically nothing super weird on my site. I love this plugin. Highly recommended.

![](https://secure.gravatar.com/avatar/9887a37b528e8e2b932c47703ad41fac1bb8cd89e32476d5cdb92f279496c52e?
s=60&d=retro&r=g)

### 󠀁[Excellent](https://wordpress.org/support/topic/excellent-8624/)󠁿

 [milad](https://profiles.wordpress.org/miladcheraghi/) February 9, 2020

very perfect. thanQ

 [ Read all 14 reviews ](https://wordpress.org/support/plugin/wp-svg-images/reviews/)

## Contributors & Developers

“WP SVG Images” is open source software. The following people have contributed to
this plugin.

Contributors

 *   [ ShortPixel ](https://profiles.wordpress.org/shortpixel/)
 *   [ kubiq ](https://profiles.wordpress.org/kubiq/)

[Translate “WP SVG Images” into your language.](https://translate.wordpress.org/projects/wp-plugins/wp-svg-images)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/wp-svg-images/), check
out the [SVN repository](https://plugins.svn.wordpress.org/wp-svg-images/), or subscribe
to the [development log](https://plugins.trac.wordpress.org/log/wp-svg-images/) 
by [RSS](https://plugins.trac.wordpress.org/log/wp-svg-images/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 4.4

🔒 Security Update

Release Date: January 23, 2025

🛠️ Fixes

 * Security Patch: Resolved another potential Cross-Site Scripting (XSS) vulnerability,
   responsibly disclosed by the amazing team at WordFence and discovered by Ryan
   Zegar.

We highly recommend updating to this version to ensure your site remains safe and
secure. 💪🔐

#### 4.3

Release 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).

#### 4.2

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.

#### 4.1

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.

#### 4.0

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`.

#### 3.7

 * tested on WordPress 5.9

#### 3.6

 * fix typo in last update

#### 3.5

 * tested on WordPress 5.8
 * fix missing width and height for core/image block

#### 3.4

 * allow SVG uploads only for administrators and editors

#### 3.3

 * tested on WordPress 5.7

#### 3.2

 * tested on WordPress 5.4

#### 3.1

 * tested on WordPress 5.3

#### 3.0

 * added support for Beaver Builder media uploader

#### 2.9

 * tested on WordPress 5.0

#### 2.8

 * fix SVG size as featured image

#### 2.7

 * earlier upload_mimes filter init fix

#### 2.6

 * svg sizing css removed because of many conflicts

#### 2.5

 * fixed svg icon size in plugins updating listing

#### 2.4

 * SVN commit problem

#### 2.3

 * fixed svg icon size in plugins listing

#### 2.2

 * convert svg width and height to float number [PX]

#### 2.1

 * added svg width and height metadata

#### 2.0

 * added svgz support
 * fixed svg thumbnails

#### 1.4

 * repair count() error

#### 1.3

 * 4.9 compatibility

#### 1.2

 * added size calculation fix for wp_get_attachment_image_src

#### 1.1

 * fix for WP4.7.1 bug

#### 1.0

 * First version

## Meta

 *  Version **4.4**
 *  Last updated **5 months ago**
 *  Active installations **30,000+**
 *  WordPress version ** 3.0.1 or higher **
 *  Tested up to **6.9.4**
 *  PHP version ** 5.6.40 or higher **
 * Tags
 * [sanitization](https://wordpress.org/plugins/tags/sanitization/)[SVG](https://wordpress.org/plugins/tags/svg/)
   [svg support](https://wordpress.org/plugins/tags/svg-support/)[svg upload](https://wordpress.org/plugins/tags/svg-upload/)
 *  [Advanced View](https://wordpress.org/plugins/wp-svg-images/advanced/)

## Ratings

 5 out of 5 stars.

 *  [  12 5-star reviews     ](https://wordpress.org/support/plugin/wp-svg-images/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/wp-svg-images/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/wp-svg-images/reviews/?filter=3)
 *  [  0 2-star reviews     ](https://wordpress.org/support/plugin/wp-svg-images/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/wp-svg-images/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/wp-svg-images/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/wp-svg-images/reviews/)

## Contributors

 *   [ ShortPixel ](https://profiles.wordpress.org/shortpixel/)
 *   [ kubiq ](https://profiles.wordpress.org/kubiq/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/wp-svg-images/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://www.paypal.me/resizeImage)