Categories

  • Access & Security 95
  • Administration 171
  • Advertisement 92
  • Audio & Video 66
  • Author & Content 99
  • Comments 96
  • Communication 110
  • Communities & Forums 84
  • Development 47
  • E-Commerce 76
  • Email Management 53
  • Events & Calendars 80
  • Language 25
  • Map & Weather 44
  • Migration & Conversion 28
  • Miscellaneous 254
  • Mobile 15
  • Photos 143
  • Plugins 260
  • SEO & Site Speed 118
  • Social 186
  • Theme Enhancement 169



  • Add this plugin to a List

    You need to be logged in to add this plugin to your list.

    SVG Support

    Add to List

    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:

    • SVG Upload Support: Easily upload SVG files to your media library.
    • Automatic Sanitization: All SVG uploads are sanitized by default to ensure security.
    • Minification Options: Reduce SVG file sizes with optional minification.
    • Inline Rendering: Render SVG code inline by adding the "style-svg" class to your images, making the elements within your SVGs directly targetable for styling and animation.
    • Role-Based Upload Control: Restrict SVG upload capabilities to specific user roles.
    • Custom Target Class: Define a custom CSS class for targeting SVGs, which can be applied to outer elements for greater flexibility.

    Features

    • Full SVG support in your media library
    • Automatic sanitization for secure SVG uploads
    • Optional minification for smaller SVG file sizes
    • Role-based upload restrictions
    • Inline SVG rendering for easy styling and animation
    • Custom target class support for flexible SVG handling
    • Simple and intuitive settings page with clear instructions
    • Extremely Simple to Use – Simplifies complex SVG file handling

    Usage

    1. Installation: Install and activate SVG Support (this plugin) through your WordPress dashboard.

    2. Basic Usage: Once activated, you can upload SVG files to your media library like any other image file.

    3. Admin Settings:

      • Navigate to “Settings > SVG Support” in your WordPress admin dashboard.
      • Restrict SVG file uploads to specific user roles, such as Administrators.
    4. Advanced Mode:

      • If you only need to upload SVG files as static images, you don’t need to enable “Advanced Mode”. This keeps the plugin lightweight by not enqueuing unnecessary scripts.
      • For Advanced Use: Enable “Advanced Mode” to access additional features such as minification and inline rendering.
    5. Inline SVG Rendering:

      • With Advanced Mode enabled, you can embed SVG images by adding the "style-svg" class (or a custom class you’ve defined) to your <img> tags.
      • Example:
        <img class="style-svg" alt="alt-text" src="image-source.svg" />
        or
        <img class="your-custom-class" alt="alt-text" src="image-source.svg" />
      • The plugin dynamically replaces the <img> element with the actual SVG code, making the SVG’s internal elements targetable by CSS and JavaScript.
    6. Custom Target Classes:

      • You can set a custom class to target for inline rendering.
      • You can add the target class to outer elements if you cannot directly add it to the <img> tag. The plugin will traverse the element’s children to find and replace the SVG.
    7. Auto-Class Insertion (Classic Editor):

      • Enable the setting to automatically add your target class to SVG images when inserting them into posts or pages. This also removes unnecessary attributes.
    8. Inline Rendering:

      • Since version 2.3.11, you can force all SVG files sitewide to be rendered inline with a single checkbox (use with caution).
      • You can choose between the minified or expanded version of the JS file for inline rendering.
      • You can choose between the jQuery or vanilla JS file for inline rendering.
    9. Featured Images:

      • If you save a post/page with an SVG as the featured image, a checkbox will appear in the featured image meta box to allow you to render the SVG inline (only available if Advanced Mode is active).

    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.

    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

    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:

    • Sanitization by default: Starting from version 2.5.8, all SVG uploads are sanitized by default to remove any potentially malicious code.
    • Role-Based Upload Restrictions: You can restrict SVG uploads to specific user roles, ensuring only trusted users can upload these files.
    • Optional Bypass of Sanitization: You have the option to allow certain roles to bypass the sanitization process, though this should be used with caution.

    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.

    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 Warpcast

    Note: I hope you like this plugin! Please take a moment to rate it.

    Translations

    You can contribute your translation here.
    New to Translating WordPress?
    Read through the Translator Handbook to get started.

    Rate This Plugin

    Please Login to Rate this Plugin!

    Function

    Feature

    Support

    0 Votes
    Not Rated Yet

    Wordpress.org Stats

    Ratings4.8
    Votes340
    Downloads9,633,791
    Last Updated71 Days ago
    Published10 years ago

    Report Wrong Category!

    Do you think this Plugin belongs to another Category?

    What Category Should this Plugin belong to? *

    Reason *

    Create a Plugin List

    You need to be Logged in to Create a Plugin List.

    Submit A plugin

    You need to be logged in to submit a plugin.

    Help

    WPD is the unofficial online plugin directory of WordPress.

    An attempt has been made to list Only functional, active,efficient and up-to-date plugins.

    Categorized : Plugin are listed by category and subcategory based on functionality and uses. Here you can browse wordpress plugin from our neatly categorized plugin directory and sort the plugins by rating, votes, last updated and published and search plugins using tags.

    Search : Plugins can be searched by their functionality using multi-tag search and you can search plugins using their exact name although we are not ensuring Google like search accuracy.

    Create Plugin Lists : You will be able to create list of plugins and share them with Wordpress Community or you can keep them private and use them as a bookmarks.
    e.g. Plugins That I’ve Used on My Site, Best Event Management Plugins, Christmas Plugins etc.

    If you think certain awesome plugin is not in the directory then notify us through our Submit a Plugin page.

    Browsing the Plugin Directory

    Browse by Category

    In WPD, Plugins are categorized carefully. You can browse all the categories from the homepage or you can access the category lists from any page by clicking the button from the left of the website.


    Browse by Tags

    Each plugin listed in WPD is marked with useful tags. You can browse plugins by Tags from the All Tags page


    Searching in WPD

    Multi Tag Search

    You can search plugins using multiple tags. To perform a multi-tag search. Go to Homepage and then in the search field type any keywords or tags(comma separated) and then click on the search button. To search plugins from a selected category just select the category from the dropdown and type your tags.


    Searching a specific Plugin in WPD

    If you want to find a specific plugin in our directory, Go to Homepage and then select the "Search in Title" option. Then write the name of the plugin and click the search button to find the Plugin.


    Plugin Lists

    Whats a Plugin List

    Plugin Lists are user created lists of plugins. Any registered users can create Plugin Lists and share it with anyone or make it private.


    Why Create a plugin List?
    • Easy to keep track of your favourite and useful plugin.

    • Share list of plugins on blogs, social media or to a client.

    • Keep a track of what plugins you installed in which of your blogs by creating a list for each blog



    Creating a Plugin List

    To create a Plugin List, click the button from the left of the page; a popup box will appear. In the "List Name" field, put the name of the List. eg: Best Seo plugins for your site.
    In the Description field, put a few words describing the List.
    By default, lists are automatically published as public, which is visible to everyone. If you do not want others to see the List, select "Private" from the dropdown list. Then click the "Create List" button to create the list.


    Adding Plugins to your List

    To add a plugin to your List, go to a plugin page and click the "Add to List" button. A popup box will appear where you can select in which of your list you want to add this plugin. You can add a note if you want, this note will appear below the plugin in your list.
    P.S: You can only add plugins that are in our directory.

    Your Lists will appear in our "Plugin Lists" page when you set the list as "Public" and your list contains atleast 2 plugins.


    Editing your Lists

    When you are on your list page, notice there is a button on the top right corner of the page. Click it to edit the List Name and the List Description.


    Accessing All your Lists

    You can access all your Plugin lists by going to your profile and clicking the "Lists" tab.


    Removing your Lists

    You can remove your Plugin lists by going to your profile and clicking the "Lists" tab. on top right of each list click the button to remove the list completely.

    While tremendous effort has been put to keep this directory precise and complete, still errors and omissions are unavoidable and possible. We welcome any suggestions for corrections, deletions, and idea that might improve the overall experience.

    To submit a Feedback click the from the bottom right corner of the site.

    Brave Popup Builder
    Our Latest WordPress Plugin
    Create Awesome WordPress Popups with Intuitive visual Editor. Choose from hundreds of Presets. Create Beautiful Popups and convert more visitors to subscribers, clients and customers.
    This Popup was Built with this plugin.
    Marketing knowledge
    Upgrade your
    Leverage agile frameworks to provide a robust synopsis for high overviews.
    Register or log in to assess the record