To enable SVG uploads in WordPress, install the free Nexter Extension plugin, turn on SVG Upload under Nexter > Nexter Extension > Security, choose the user roles that may upload SVG files, and click Save.
What It Does
SVG Upload lets the user roles you select add .svg files to your WordPress site. The plugin sanitizes each SVG upload it handles, which means it removes markup that is not on its allowed list.
Why It Matters
WordPress does not allow SVG uploads by default. An SVG file is text-based markup that can carry scripts, so it is worth limiting uploads to people you trust and cleaning the files on the way in.
What You Get
- An SVG Upload card on the Security screen
- A Roles allowed to upload SVG list where you switch each role on or off
- Sanitizing of uploaded SVG files
Benefits
- Logos and icons stay sharp at any size, because SVG is a vector format
- You decide which roles get the file type
- No custom upload code to write
Capabilities
| Case | What happens with Nexter Extension |
|---|---|
| A selected role uploads a valid SVG | The file is sanitized and saved |
| The file cannot be sanitized | The upload is refused with a message |
| The file is larger than 5 MB | The upload is refused |
| The SVG has width and height, or a viewBox | Those values are used as the image size in WordPress |
How It Works
For users in a selected role, the plugin adds SVG to the file types WordPress accepts. Before the file is stored, it runs through an SVG sanitizer. In our test with Nexter Extension 4.9.2 on WordPress 7.1.5, an administrator uploaded an SVG that contained a script element and an onload attribute through the WordPress REST API. The saved file kept the drawing, without the script or the attribute.
How to Use It
- In your WordPress dashboard, go to Nexter > Nexter Extension > Security.
- Turn on the SVG Upload card and click Configure.

- Under Roles allowed to upload SVG, switch on each role that should upload SVG files, for example Administrator.
- Click Save.
- Sign in as a user with that role and upload the file under Media.
Use Cases
- Uploading a company logo as a vector file
- Adding custom icons that a designer supplied as SVG
- Letting only administrators add SVG files on a site with several authors
Limitations
- Sanitizing lowers risk. It does not make a file from an unknown source safe, so give the file type only to roles you trust.
- Turning on the card is not enough for Nexter Extension. Choose at least one role and click Save.
- SVG Upload allows the file type. It does not give a role permission to upload media. In a default WordPress setup, Contributors and Subscribers cannot upload files.
- The free Nexter Blocks plugin has its own SVG upload support. In version 5.0.11 it allows SVG for users who can post unfiltered HTML (by default administrators and editors on a single site, and super admins on multisite). While it is active, switching a role off in Nexter Extension may not block that user.
- WordPress does not build smaller responsive copies of an SVG.
Troubleshooting
Sorry, you are not allowed to upload this file type
Check that the SVG Upload card is on, that the user’s role is switched on in the panel, and that you clicked Save.
SVG could not be sanitized and was not uploaded
The sanitizer could not read the file as valid SVG. Export it again from your design tool as a plain SVG, then upload the new file.
File size exceeds maximum allowed size
Nexter Extension refuses SVG files over 5 MB. Simplify the paths or remove embedded images, then upload again.
The SVG shows no dimensions in WordPress
Open the file in a text editor and check that the svg element has a width and height, or a viewBox.
A role you switched off can still upload SVG
Check whether Nexter Blocks or another plugin that allows SVG uploads is active.











