Safely upload SVG files to WordPress with automatic sanitization. Real security, real previews, real role-based control. Free forever.
WordPress blocks SVG uploads by default — and for good reason. SVG files are XML documents that can contain <script> tags, event handlers, XXE attack vectors, and external resource calls. Most SVG upload plugins either skip sanitization entirely or charge you $39/year for the privilege.
AODN Free SVG Upload fixes this properly: whitelist-based DOMDocument sanitization that strips every known attack vector, role-based upload control, and proper Media Library previews. Free. No upsell. No subscription. No catch.
- Whitelist-based SVG sanitization — server-side DOMDocument parsing removes malicious code before the file touches your server
- 40+ allowed SVG elements — shapes, gradients, filters, animations, text, markers, and clipping paths all preserved
- 90+ allowed attributes — presentation, transforms, accessibility, and data attributes pass through
- 14 dangerous element categories blocked —
<script>,<iframe>,<embed>,<object>,<foreignObject>,<applet>, and more - All event handlers stripped — every
on*attribute removed from every element - Dangerous URI scheme blocking —
javascript:,data:,vbscript:,blob:, andfile:protocols blocked - XXE attack prevention — DOCTYPE and ENTITY declarations stripped before parsing
- Role-based upload control — choose which user roles can upload SVGs (Administrator-only by default)
- Media Library SVG previews — SVGs display as actual images in grid and list views
- SVG dimension extraction — width/height read from viewBox or dimension attributes
- Automatic updates — new versions delivered through your WordPress dashboard
- Clean uninstall — all options and transients removed when you deactivate and delete
- Download the latest release
- Upload the zip via WordPress Admin > Plugins > Add New > Upload Plugin
- Activate — SVG uploads are immediately enabled and sanitized
- Clone or download this repo
- Copy the
aodn-free-svg-uploadfolder to/wp-content/plugins/ - Activate through Plugins in WordPress admin
No configuration required. It just works.
Download directly from our site with email-only registration:
Get AODN Free SVG Upload — free download, automatic updates included.
- Pre-parse cleanup — DOCTYPE declarations stripped to prevent XXE attacks. Processing instructions and CDATA sections removed.
- Element whitelist — every DOM node checked against a strict whitelist. Unknown elements removed entirely.
- Attribute scrubbing — all
on*event handlers stripped. Dangerous URI schemes (javascript:,data:,vbscript:) removed from href attributes. Style attributes checked forexpression()and dangerousurl()references. - Final validation — regex sweep confirms no
<script>tags or event handlers survived. If anything suspicious remains, the upload is blocked.
| Feature | AODN Free SVG Upload | Safe SVG (Free) | SVG Support Pro ($39/yr) |
|---|---|---|---|
| SVG sanitization | Yes — whitelist | Yes | Yes |
| Role-based upload control | Yes | No | Yes |
| Media Library previews | Yes | Yes | Yes |
| XXE attack prevention | Yes | Partial | Yes |
| foreignObject blocking | Yes | Yes | No |
| Auto-updates | Yes | Via wordpress.org | Yes |
| Price | $0 — Free forever | Free | $39/year |
- WordPress 6.0 or higher
- PHP 7.4 or higher (PHP 8.x fully supported)
- PHP Extension: DOMDocument (enabled by default on virtually all hosts)
- Tested up to: WordPress 6.9
Yes. No catch. No premium tier. No upsell. No license key. No account required. AODN Free SVG Upload is open source (GPL v2) and will stay free forever. If you want advanced features like configurable file size limits, inline SVG rendering, and metadata stripping, check out Secure SVG Pro — a one-time $19 purchase.
Yes. The plugin was tested by 7 independent AI models across 3 review rounds before release. Every SVG is parsed by PHP's DOMDocument, checked against strict element and attribute whitelists, and scrubbed of all known attack vectors.
Automatic updates via your WordPress dashboard — same as any plugin. When a new version is available, you'll see the notification in your Plugins page.
No. The sanitizer preserves all visual SVG elements — shapes, gradients, filters, animations, text, clipping paths, and transforms. Only dangerous elements and attributes are removed.
This is open source under GPL v2. Fork it, customize it, submit PRs. If you find a bug, open an issue.
- AI Or Die Now — our home base
- Product page — full description, demo video, and free download
- All plugins — browse our complete plugin catalog
- Report an issue
- Email: support@aiordienow.com
- Initial release
- SVG upload with automatic whitelist-based sanitization
- Media Library preview support (grid and list views)
- Role-based upload permissions
- SVG dimension extraction from viewBox/attributes
- XSS, XXE, and injection protection
- Automatic updates from updates.aiordienow.com
- Clean uninstall (removes all options and transients)
GPL v2 or later. See LICENSE for full text.
Built by AI Or Die Now — Premium WordPress plugins, no subscriptions.


