WordPress SVG Object Plugin


Unlock the power of SVG and animations in Wordpress

A gutenberg block that allows you to add an SVG in an object element. This is a wordpress plugin that adds a gutenberg block in which you can add an SVG to your page.

Why?

  • You don’t need to add support to the core image block for svgs in the functions.php
  • Instead of adding the SVG into the image () element (like what it would do if you add SVG support
    to the core image block for SVGs), SVGs are placed in an object block instead. This allows
    you to manipulate the SVG in javascript and do all sorts of cool stuff with it.
    SVGs added just in the block cannot be altered or interacted with in the DOM.
    However if they are in an.

The reason I created this was so that I could use the SnapSVG library to manipulated an interactive map SVG. This allows the svg to be visible right in the block editor, but still embedded as an object instead of an image like it normally would by default

Photo Gallery

Tagged Skills

Open Source React WordPress