sandywp / plugins / svg-support
SVG Support
Securely upload SVG files to your media library, with built-in sanitization and advanced features for styling and animation.
Ready in seconds.
v2.6.1 1,000,000+ installs WP 5.8+ PHP 7.4+

What you get inside
8 screens-
Settings screen
-
Advanced Mode settings
-
Featured Image checkbox to render SVG inline
-
SVG used in WP native Image Widget
-
Inline SVG in the front end markup
-
Help tab - Overview
-
Help tab - The Settings
-
Help tab - Standard Usage
About this plugin
The complete SVG solution for WordPress – secure, flexible, and easy to use.
SVG Support enables secure SVG uploads with powerful features for both basic users and developers:
✨ Key Features:
– Secure SVG uploads with automatic sanitization
– Inline rendering for direct CSS/JS manipulation
– File size optimization through minification
– Role-based access control
– Advanced developer options
– Multisite compatible
– Full Block Editor (Gutenberg) compatibility
🔒 Security First:
– Built-in sanitization removes potentially harmful code
– Role-based upload restrictions
– Comprehensive MIME type validation
🎨 Designer Friendly:
– Direct styling of SVG elements
– Animation support
– Custom class targeting
– Automatic dimension handling
💻 Developer Ready:
– Advanced mode for additional features
– REST API support
– Gutenberg compatible
– Extensive hooks and filters
Usage
Basic Usage:
– First, install and activate SVG Support via your WordPress dashboard
– Upload SVG files to your media library like any other image
– Works seamlessly with Image blocks, Cover blocks and featured images
Advanced Usage:
– Enable “Advanced Mode” for minification and inline rendering
– Customize with hooks and filters for tailored functionality
Block Editor Usage:
– Use Advanced Mode to enable inline rendering:
– Add the "style-svg" class to Image blocks
– Add the "style-svg" class to Cover blocks to render SVG backgrounds inline
– Use “Skip Nested SVGs” setting to control inline rendering of SVGs within Cover blocks
Classic Editor Usage:
– Use Advanced Mode to add the "style-svg" class to <img> tags for inline rendering
– Enable “Auto Insert Class” option for automatic class insertion in Classic Editor
Common Issues & Solutions:
– SVG not displaying? Ensure dimensions are set in CSS.
– Need help? Use the support tab and I will do my best to assist you.
Spin up a test site
With a single click, you can spin up a completely free test site to test SVG Support using TasteWP! No sign up, no cards, nothing! How cool is that? Give it a go:
Click Here to spin up a test site in seconds
Security
SVG Support prioritizes security with automatic sanitization and role-based restrictions. Only trusted users should have upload permissions. Configure settings to balance functionality and security.
Feedback
I’m open to your suggestions and feedback – Thanks for using SVG Support!
Follow @SVGSupport on Twitter
Follow @benbodhi on Twitter
Follow @benbodhi on Farcaster
Note: I hope you like this plugin! Please take a moment to rate it.
Development & Contributing
The development version of SVG Support is maintained on GitHub. Feel free to contribute:
- Submit bug reports or feature suggestions: GitHub Issues
- Contribute code via Pull Requests
- Development repository: GitHub
Translations
Contribute translations here. New to translating? Check the Translator Handbook.
Questions
- SVG not rendering inline since 2.3 update
Ensure “Advanced Mode” is enabled in Settings > SVG Support.
- How do I disable the Javascript on the front end if I am not using inline SVG?
Disable “Advanced Mode” in the settings.
- I’m trying to use SVG in the customizer but it’s not working.
To allow SVG to work in the customizer, you will need to modify/add some code in your child theme’s function file. Here is a great tutorial on how to do that. The important part is:
'flex-width' => true 'flex-height' => true- How do I add animation to my SVG?
You will need to edit your SVG file in a code editor so you can add CSS classes to each element you need to target within the SVG. Make sure that your IMG tag is being swapped out for your inline SVG and then you can use CSS or JS to apply animations to elements within your SVG file.
- Why is SVG Support not working in multisite?
If you installed multisite prior to WordPress 3.5, then you will need to remove your ms-files. Here is a couple of resources to help you: Dumping ms-files Removing ms-files after 3.5.
- Why is my SVG not working in Visual Composer?
If you are using SVG Support with Visual Composer or any other page builders, you will need to make sure that you can add your own class to the image. The easiest way to do this is by using a simple text or code block in the builder to put your image code in to. Additionally, there is now a setting to force all SVG files to be rendered inline.
- How do I get this to work with the Media Library Assistant plugin?
You need to add the mime type for svg and svgz to: “MLA Settings > Media Library Assistant > Uploads (tab)” and then it works.
sandywp / also on the shelf
Try another plugin
5.0 · 8K+ installs
Adds icons automatically to any uploads and/or file links inserted into your blog posts.
10+ installs
The easiest way to upload svg image file in your WordPress Site.
-
Enables you to filter the media listing by the media mime type
Spin up a real WordPress site in seconds.
Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.