Description
Svigent Tools is a lightweight, modern, and secure solution for using SVG (Scalable Vector Graphics) in WordPress.
By default, WordPress restricts SVG uploads due to potential XML-based vulnerabilities (such as Cross-Site Scripting and XML External Entity attacks). Svigent Tools solves this by implementing enterprise-grade DOM-level sanitization on upload, giving you complete peace of mind while designing beautiful, resolution-independent vector graphics.
Key Features
- Enterprise-Grade SVG & SVGZ Sanitization: Automated XML inspection powered by
enshrined/svg-sanitizeto strip malicious scripts, event listeners, and dangerous entities before files reach your disk. - Native Media Library Previews: Automatically fixes broken 1×1 or invisible SVG thumbnails in both Grid and List views in
wp-admin/upload.php. - Automatic Dimension Detection: Parses
viewBoxandwidth/heightcoordinates on upload and writes them to WordPress attachment metadata to preserve natural aspect ratios. - Zero-Overhead Frontend Inlining: Replaces target
<img>elements with raw<svg>using lightweight client-side Vanilla JS (< 2KB), enabling dynamic CSS styling (fill: currentColor) and hover animations. - Smart In-Memory Caching: Deduplicates identical SVG network requests so repeated icons on a page are downloaded only once.
- Dynamic DOM Observer: Fully compatible with Gutenberg block insertion, Elementor, and AJAX infinite scroll using
MutationObserver. - Role-Based Upload Permissions: Restrict SVG upload privileges to Administrators only or extend permissions to all users with upload capabilities (Authors/Editors).
- Lossless Vector Scaling: Skips unnecessary raster thumbnail generation (GD/Imagick) and disables redundant
srcsetgeneration to conserve server disk space.
Screenshots

Installation
- Log in to your WordPress Admin Dashboard.
- Navigate to Plugins Add New.
- Search for Svigent Tools or upload the
svigent-tools.ziparchive. - Click Install Now and activate the plugin.
- Go to Settings Svigent Tools to configure permissions and inlining preferences.
FAQ
-
Why does WordPress restrict SVG uploads by default?
-
SVG files are XML documents, meaning they can contain executable JavaScript and external entity references that could lead to Cross-Site Scripting (XSS) or XXE attacks. Svigent Tools strips all hazardous elements during upload while preserving all visual graphics, gradients, and shapes.
-
How do I render an SVG inline on the frontend?
-
- Enable Frontend Inline Rendering under Settings Svigent Tools.
- Add the class
style-svg(or your custom selector) to any Image block or element. - Svigent Tools will automatically convert the
<img>tag into an inline<svg>element on the frontend.
-
Does Svigent Tools work with page builders?
-
Yes! Svigent Tools works out of the box with the WordPress Block Editor (Gutenberg), Elementor, Beaver Builder, Divi, and classic themes.
-
Do I need to write code to use Svigent Tools?
-
No! Svigent Tools works automatically. Once enabled, you can upload SVGs and style them using simple settings in your WordPress Admin.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Svigent Tools” adalah perisian sumber terbuka. Orang-orang berikut telah menyumbang kepada pemalam ini.
PenyumbangTranslate “Svigent Tools” into your language.
Berminat dalam pembangunan?
Layari kod, periksa repositori SVN, atau langgani log pembangunan dengan RSS.
Changelog
1.0.0
- Initial release.
- Added safe SVG and SVGZ upload handling.
- Integrated DOM-level XML sanitization via
enshrined/svg-sanitize. - Added Media Library grid and list thumbnail preview styling.
- Added automatic
viewBoxdimension extraction and attachment metadata normalization. - Added client-side Vanilla JS inlining engine with in-memory caching and
MutationObserver. - Added role-based upload restriction settings.