Upload SVG files to your media library securely, with built-in sanitization and advanced features for styling and animation.
SVG Support goes beyond just enabling SVG uploads. It offers powerful features that make working with SVGs easier and more flexible.
Scalable Vector Graphics (SVG) are a staple in modern web design, allowing you to embed images with small file sizes that scale perfectly at any size without losing quality. However, styling and animating SVGs can be challenging when using standard methods. SVG Support simplifies this by allowing you to render your SVGs inline, enabling direct styling and animation using CSS and JavaScript.
This plugin provides:
"style-svg"
class to your images, making the elements within your SVGs directly targetable for styling and animation.Installation: Install and activate SVG Support (this plugin) through your WordPress dashboard.
Basic Usage: Once activated, you can upload SVG files to your media library like any other image file.
Admin Settings:
Advanced Mode:
Inline SVG Rendering:
"style-svg"
class (or a custom class you’ve defined) to your <img>
tags.<img class="style-svg" alt="alt-text" src="image-source.svg" />
<img class="your-custom-class" alt="alt-text" src="image-source.svg" />
<img>
element with the actual SVG code, making the SVG’s internal elements targetable by CSS and JavaScript.Custom Target Classes:
<img>
tag. The plugin will traverse the element’s children to find and replace the SVG.Auto-Class Insertion (Classic Editor):
Inline Rendering:
Featured Images:
Important: If your SVG isn’t displaying correctly, it might be due to 0 height and width. Set your SVG’s dimensions in your CSS to ensure proper display.
For any issues, please use the support tab, and I will do my best to assist you quickly.
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
Uploading files, including SVGs, comes with potential risks. SVG Support provides several features to help mitigate these risks and ensure secure handling of SVG files:
Important: Only allow users you trust to upload SVG files. By default, anyone with Media Library access or the upload_files
capability (e.g., Administrators, Authors, Editors) can upload SVGs. Remember, SVG files are XML-based, meaning they can contain malicious code if not properly sanitized. Always configure your settings to balance functionality with security.
I’m open to your suggestions and feedback – Thanks for using SVG Support!
Follow @SVGSupport on Twitter
Follow @benbodhi on Twitter
Follow @benbodhi on Warpcast
Note: I hope you like this plugin! Please take a moment to rate it.
You can contribute your translation here.
New to Translating WordPress?
Read through the Translator Handbook to get started.