Skip to content

How to Enable SVG File Upload in WordPress?

Key Takeaways

  • Nexter Extension activa la carga de SVG en WordPress desde Nexter > Nexter Extension > Security, con la tarjeta SVG Upload, la lista Roles allowed to upload SVG y el botón Save.
  • Nexter Extension sanitiza cada SVG subido y elimina marcado que no está en su lista permitida; en la prueba con Nexter Extension 4.9.2 en WordPress 7.1.5, un SVG con script y onload se guarda sin esos elementos.
  • Nexter Extension rechaza archivos SVG que no se pueden sanear o que superan 5 MB, y usa width, height o viewBox como tamaño de imagen en WordPress.
  • Nexter Blocks versión 5.0.11 también tiene soporte propio para SVG y permite SVG a usuarios que pueden publicar HTML sin filtrar, por lo que desactivar un rol en Nexter Extension no siempre lo bloquea mientras ese plugin siga activo.
Table of Contents

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

CaseWhat happens with Nexter Extension
A selected role uploads a valid SVGThe file is sanitized and saved
The file cannot be sanitizedThe upload is refused with a message
The file is larger than 5 MBThe upload is refused
The SVG has width and height, or a viewBoxThose 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

  1. In your WordPress dashboard, go to Nexter > Nexter Extension > Security.
  2. Turn on the SVG Upload card and click Configure.
Nexter Security screen with Security selected in the sidebar and the SVG Upload card turned on
  1. Under Roles allowed to upload SVG, switch on each role that should upload SVG files, for example Administrator.
  2. Click Save.
  3. 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.

Suggested Reading

Share your Thoughts

Still in Doubt? Let’s Assist You

Have Feedback or Questions?

Join our WordPress Community on Facebook!

Related Frequently Asked Questions

Why is WordPress blocking SVG uploads by default?

WordPress blocks SVG uploads because SVG is text-based markup, not a flat image format. That matters because SVG files can carry scripts, so letting only trusted roles upload them reduces risk. Nexter Extension handles the sanitizing step on upload, which strips markup that is not on its allowed list before the file is stored.

What should I do if WordPress says I’m not allowed to upload this file type?

That message usually means the SVG Upload card is off, the user’s role is not switched on, or the settings were not saved. In Nexter Extension, the role toggle and Save action both matter. If either one is missed, WordPress still treats SVG as blocked for that user.

What file size limit does Nexter Extension use for SVG uploads?

Nexter Extension refuses SVG files over 5 MB. That limit matters because large SVGs often come from overly complex paths or embedded images. If an upload fails at that size, simplifying the artwork usually helps more than trying again unchanged.

Can I use an uploaded SVG as a logo or icon in WordPress?

SVG works well for logos and icons because it stays sharp at any size. Nexter Extension sanitizes the file and saves it for selected roles, so it fits common design assets like company logos or custom icons from a designer. That makes it a better choice than raster images when scaling matters.

Why can a role still upload SVG after I switched it off?

Another plugin may still be allowing SVG uploads. The page calls out Nexter Blocks specifically: in version 5.0.11 it allows SVG for users who can post unfiltered HTML, which includes administrators and editors on a single site and super admins on multisite. If that plugin is active, switching a role off in Nexter Extension may not fully block it.

Last reviewed: November 29, 2026

Related Docs