What is SVG in WordPress?

MEDIA Format

SVG (Scalable Vector Graphics) is an XML-based vector image format. Unlike raster formats (JPEG, PNG, WebP), SVG is resolution-independent — an SVG logo looks sharp at any size without a larger file. It is the standard format for logos, icons and illustrations on modern websites.

SVG and WordPress

WordPress does not allow SVG uploads by default. SVG files can contain embedded JavaScript, making them a potential security vector if uploaded by untrusted users. Enabling SVG requires either a trusted plugin (Safe SVG is the most common) or a custom upload_mimes filter.

Because SVG is not a raster format, standard image compression does not apply. SVG optimisation means removing unnecessary XML, comments and metadata from the file — tools like SVGO handle this. Mediapapa does not currently compress or score SVG files; they are outside the current format scope.

When to use SVG on WordPress

SVG is the right choice for logos, icons, diagrams and illustrations that need to render sharply at multiple sizes. A single SVG logo file replaces the need for 1x, 2x and 3x raster versions. For photographic or complex colour content, raster formats (WebP, JPEG) remain more appropriate.

Frequently asked questions

Why does WordPress block SVG uploads?

SVG files are XML and can contain embedded scripts. If a malicious user uploads an SVG with embedded JavaScript, it could execute in the browser when the file is viewed directly. The Safe SVG plugin sanitises uploaded SVG files to remove potentially dangerous content before storing them.

Does Mediapapa support SVG?

Not in the current version. SVG is on the roadmap. Currently, SVG files upload and display normally in WordPress but are not analysed, scored or indexed by Mediapapa.

Related terms: MIME Type · PNG · Image Optimisation