SVG Block

plugin banner

Display an SVG image as a block, which can be used for displaying icons, dividers…

Author:Phi Phan (profile at wordpress.org)
WordPress version required:6.3
WordPress version tested:6.6
Plugin version:1.1.23
Added to WordPress repository:05-04-2022
Last updated:03-07-2024
Rating, %:100
Rated by:12
Plugin URI:
Total downloads:23 284
Active installs:2 000+
plugin download
Click to start download

This SVG block allows you to display SVG images as inline HTML markup. You can either choose an icon from the icon library with more than 3000 icons or you can upload or input your custom SVG images directly in the block’s setting.
It also allows you to upload SVG images to the WordPress media library, and load them into the icon library. Only SVG files that have XML declaration at the top like <?xml version="1.0" encoding="utf-8"?> can be uploaded to the WordPress media library.

Key Features

  • Accessibility ready with ‘img’ role, automatically generates title and description from settings.
  • Automatically sanitize SVG markup to make it safe and lightweight.
  • Include almost all settings to customize the SVG image.
  • Include a collection of common non-rectangular dividers.
  • An icon library included icons from “Bootstrap Icons”, “Ionicons”, “Dashicons” and new “WordPress Icons”.
  • Allow uploading SVG images to the WordPress media library
  • Automatically load SVG images from the media library into the icon library

Video tutorials

How to create an icon with custom styles using the icon library:

How to create a non-rectangular background section:

How to create icon buttons:

Please take a look at these custom block patterns that use this block to see how it can be applied to real-world sites.

If this plugin is useful for you, please do a quick review and rate it on WordPress.org to help us spread the word. I would very much appreciate it.

Please check out my other plugins if you’re interested:

  • Content Blocks Builder – A tool to create blocks, patterns or variations easily for your site directly on the Block Editor.
  • Meta Field Block – A block to display a meta field or an ACF field as a block. It can also be used in the Query Loop block.
  • Block Enhancements – A plugin to add more useful features to blocks like icons, box-shadow, transform, hover style, etc.
  • Icon separator – A tiny block just like the core/separator block but with the ability to add an icon to it.
  • Counting Number Block – A block to display a number that has the number-counting effect.
  • Breadcrumb Block – A simple breadcrumb trail block that supports JSON-LD structured data.
  • Better YouTube Embed Block – Embed YouTube videos without slowing down your site.

The plugin is developed using @wordpress/create-block.


Screenshots
FAQ
ChangeLog