Opens in a new tab
Turquoise abstract wavy W logo on a black background
Turquoise abstract wavy W logo on a black background
White WP PowerSuite logo on a black background
White WP PowerSuite logo on a black background
[wpps_ai_summarize]
On This Page
Last updated: 04/09/2026

Enable SVG Upload

Allow SVG and SVGZ uploads in the Media Library. Restricted to administrators only.

Overview

SVG Upload lets WordPress administrators upload SVG and SVGZ files through the Media Library while applying server-side XML sanitization before the file is accepted.

WordPress normally blocks SVG because the format is XML-based and can contain scripts, event handlers, external references, and other potentially dangerous content. WP PowerSuite restricts upload capability to administrators, validates and sanitizes the SVG document, rewrites the cleaned file on disk, and adds Media Library preview support without generating raster thumbnail derivatives.

SVG Upload is a Free module in WP PowerSuite.

Solid black square
Solid black square
Who is this for?
  • Administrators who need SVG logos, icons, diagrams, or vector graphics in WordPress
  • Agencies working with branded vector assets on client websites
  • Developers who want controlled SVG uploads without a broad MIME-enabling snippet
  • Sites that want SVG sanitization before files enter the Media Library
  • Teams that need SVGZ support as well as standard SVG

Features

SVG & SVGZ Uploads
Allow administrators to upload standard SVG and gzipped SVGZ files through supported WordPress media workflows.
Administrator-Only Access
Restrict SVG upload capability to users with manage_options.
XML Sanitization
Parse the SVG as XML and remove listed dangerous elements, event-handler attributes, and unsafe URL schemes.
SVGZ Handling
Decode, sanitize, and re-encode gzipped SVG files rather than trusting the compressed payload blindly.
5 MB Limit
Reject oversized SVG/SVGZ content before it is accepted into the Media Library.
REST Protection
Apply the same administrator restriction and validation to REST media uploads.
Media Library Preview
Provide the full-size SVG entry needed for supported WordPress media-modal previews.
No Raster Thumbnails
Skip intermediate image sizes for SVG attachments because vector files do not need WordPress raster derivatives.

Upload SVG Files Without Removing WordPress Safeguards

Sanitize the SVG Before It Is Stored

Style blocks containing @import or legacy expression() behavior are removed, and <use> references are limited so local fragment references such as #icon can remain while external or executable targets are rejected.

Handle SVGZ as Real Compressed SVG

Keep SVG Uploads Restricted to Administrators

Use SVG Naturally in the Media Library

Understand the Limits of SVG Sanitization

Use Cases

  • Logos and Branding
    Upload scalable brand marks without converting them to raster PNG files.
  • Interface Icons
    Store vector icons in the WordPress Media Library for theme or builder use.
  • Technical Diagrams
    Publish sharp diagrams and illustrations that need to scale cleanly.
  • Agency Client Assets
    Allow trusted administrators to manage sanitized SVG files without server access.
  • SVGZ Workflows
    Accept compressed SVG assets while still applying the same sanitization policy.

Frequently Asked Questions

Related Modules

Automatically convert uploaded JPEG and PNG images to WebP format for significantly smaller file sizes and faster page loads. Cannot be enabled...
Disabled
Blocks all video MIME types at upload time, displaying a friendly message directing users to embed videos instead. Apply to selected user...
Disabled
Adds smaller AVIF copies for JPEG and PNG uploads so pages can load faster. Optional setting to show those images to modern...
Disabled
Rename existing media files in your library with full control. Update SEO-unfriendly camera names, bulk rename product images, and automatically update all...
Disabled
Prevents WordPress from automatically creating multiple image sizes when you upload images. Saves disk space and speeds up uploads. Existing images keep...
Disabled
Disk usage at a glance on the dashboard home.
Disabled
Caps how large an upload can be—helpful for shared hosting or editorial guidelines.
Disabled
Regenerate all image thumbnails in your media library. Fix missing or broken thumbnails, generate new custom sizes for existing images, and update...
Disabled
Replace any media file while keeping the same URL and attachment ID. Update product photos used across multiple pages without touching any...
Disabled
Package your media library into downloadable ZIP files—the entire library, specific months, or folders (when Media Categories is enabled). ZIPs auto-expire after...
Disabled