WPX Media Allow SVG
WPX Media Allow SVG enables secure SVG and SVGZ uploads in WordPress using automatic sanitization with optional admin-only restrictions and a complete settings panel.
by Talha Hafeez · github.com/talhahafeezme/wpx-media-allow-svg
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/talhahafeezme/wpx-media-allow-svg/archive/refs/heads/main.zipWPX Media Allow SVG enables secure SVG and SVGZ uploads in WordPress using automatic sanitization with optional admin-only restrictions and a complete settings panel.
Description
WPX Media Allow SVG is a security-focused plugin designed to safely enable SVG and SVGZ uploads inside WordPress.
Features:
- Sanitizes SVG and SVGZ uploads by removing scripts, event handlers, and unsafe URIs.
- Optionally restrict SVG uploads to administrators only.
- Toggle sanitization on/off via settings.
- Defensive re-sanitization of stored attachments.
- Lightweight, no external composer libraries required.
Installation
- Upload the plugin folder to /wp-content/plugins/wpx-media-allow-svg/
- Activate the plugin through the 'Plugins' screen in WordPress
- Configure options at Settings → WPX SVG Settings
Frequently Asked Questions
Does this plugin sanitize every SVG?
Yes, if sanitization is enabled the plugin sanitizes SVGs on upload.
Can I restrict uploads to admins only?
Yes — enable the "Restrict Uploads to Administrators Only" setting.
Changelog
1.0.0
Initial release.