SVG Support
Home/Plugins/svg-support
SVG Support

SVG Support

Securely upload SVG files to your media library, with built-in sanitization and advanced features for styling and animation.

4.8(351 ratings)

Description

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
̵... [truncated]

Frequently Asked 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-hei... [truncated]

Changelog

2.5.14

  • Security Enhancements:

    • Remove default roles from the sanitizer bypass settings
  • Fixes:

    • More comprehensive upload checks, allowing generator tags and comment patterns
  • Performance Improvements:

    • Cleanup duplicate inline_featured_image meta entries more efficiently
    • Remove inline_featured_image meta entries that aren’t explicitly set to 1 (enabled)
    • Don’t store inline_featured_image meta for posts that previously had it enabled but don’t anymore
  • General Updates:

    • Restructured settings layout
    • Better cleanup on uninstall when delete plugin data is selected

2.5.13

  • Code Improvements:
    • Better PHP 8.3 compatibility – added null checks to prevent deprecated warnings... [truncated]

Statistics

Active Installs1.0M+
Downloads12.2M+
Version2.5.14
Last UpdatedInvalid Date

Requirements

WordPress
5.8+
PHP
7.4
Tested up to
6.7.4

Support

Resolution Rate0%
Total Threads3
Resolved0

Tags

mime-typesafe-svgsanitizationsvgvector