WP Manifestindependent plugin directory
manifest / security / thisismyurl-svg-support

SVG Support by Christopher Ross WP Registry grade A. No security issues foundWP RegistryNo security issues foundOpen the reportA

Secure WordPress SVG file uploads with server-side sanitization, role-based permissions, and full Media Library compatibility.

★ 0stars
v1.6190.1670latest · 3mo ago

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/thisismyurl/thisismyurl-svg-support/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

SVG Support

SVG files can carry executable code, so this plugin sanitizes every SVG on upload and stores the cleaned version in your media library.

What it does

  • Sanitizes each SVG on upload, stripping scripts, event handlers, and unsafe attributes before the file reaches the media library
  • Parses the file as XML with DOMDocument and removes unsafe nodes surgically, with no regex guesswork
  • Validates the real MIME type instead of trusting the file extension
  • Restricts SVG upload capability to administrators unless you widen it
  • Lets you allowlist trusted upload sources when you need to bypass the default restriction

Requirements

  • WordPress 6.0+
  • PHP 7.4+
  • PHP DOM extension (standard on most hosts)

Installation

  1. Upload the plugin to /wp-content/plugins/thisismyurl-svg-support/.
  2. Activate it through the Plugins screen.
  3. SVG uploads work immediately for administrators.

Security model

An SVG is an XML document, and XML documents can hold JavaScript and other executable content. This plugin sanitizes on upload, not on render. The version that gets stored and served is the cleaned one, so nothing downstream has to trust the original file.

Sanitization removes script elements, event handler attributes (onclick, onload, and the rest), javascript: URIs, use elements that reference external resources, and foreignObject elements.

Here is what it does not do, because you should know the edges. It does not sandbox SVGs at render time. It will not catch every possible XSS vector in every browser context. And it does nothing for SVGs that were already in your media library before you activated the plugin — those were stored unsanitized.

Versioning

Versions follow X.Yjjj.hhmm — year, Julian day, 24-hour time of the build.

About

SVG Support is built and maintained by Christopher Ross. I build focused WordPress tools for problems that keep showing up across real sites. No tracking, no ads, no upsells.

WordPress.org: profiles.wordpress.org/thisismyurl · GitHub: github.com/thisismyurl · LinkedIn: linkedin.com/in/thisismyurl

License

GPL-2.0-or-later. See LICENSE.

Releases

7 releases.

Tag
Published
v1.6190.1670 latest
Jul 9, 2026 3mo ago
Jun 14, 2026 4mo ago
May 29, 2026 4mo ago
May 29, 2026 4mo ago
May 27, 2026 4mo ago
May 23, 2026 5mo ago
Apr 22, 2026 6mo ago

These releases are tags only. The author does not attach a packaged zip, so there are no download counts to report.

A grade

Security

SVG Support by Christopher Ross 1.6190.1670 · audited by WP Registry

No security issues found.

Audited release
1.6190.1670
Findings
none
Worst severity
—
Content hash
8fe4b65f9689b8029c47a55a…

WP Registry hashes the installable build and reports on that exact bytes-for-bytes copy. Embargoed findings are withheld until they are disclosed, so a clean verdict means nothing public is outstanding. WP Manifest does not audit code itself.