Overview
Upload SVG logos and icons to the Media Library safely: every file is cleaned of scripts and shown with proper previews and sizes.
- SVG uploads
- Files cleaned
- Real previews
Best for: Sites with SVG logos and icons
Installation
- Download svgly-safe-svg-upload.zip from My account › My plugins or from your order email. Do not unzip it.
- In WordPress, go to Plugins › Add New Plugin › Upload Plugin, choose the zip and click Install Now, then Activate.
Requires WordPress 6.0+, PHP 7.4+. Works with any theme, block themes and page builders.
Features
- SVG uploads for administrators, editors or authors
- Every file cleaned: scripts, event handlers, external and javascript: links removed
- Only known SVG tags kept
- Comments and spaces removed for smaller files
- Real previews in the Media Library
- Width and height for blocks and themes
- Works with any theme and block
Shortcodes
Paste a shortcode in any page, post, widget or page builder text block.
[svgly_preview]
Options of each shortcode are described in the Features above and in the plugin settings page.
For developers
Customize the plugin from your theme’s functions.php or a small plugin, without editing its files (your changes survive updates).
Filters
svgly_allowedsvgly_sanitize
add_filter( 'svgly_allowed', function ( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Actions
svgly_admin_after_formsvgly_admin_before_formsvgly_admin_form_end
Updates
Updates are free. When a new version is out, it appears in Dashboard › Updates of your WordPress site and you can install it in one click, or turn on automatic updates in Plugins. This works for the zip downloaded from your Woo-Plugins account; older copies can be replaced by downloading the latest version from My plugins. See the changelog.
Frequently asked questions
Is it safe?
Every file is parsed and rebuilt with a list of allowed SVG tags; anything else is removed before the file is saved.
Are my existing SVG files cleaned?
Only new uploads are cleaned. Upload older files again to clean them.
Still stuck?
Write to us with your WordPress and WooCommerce versions and what you tried: we answer by email.