SVG File Upload documentation
Use SVG logos and icons in the media library like any other image. Every file is sanitised on upload to strip scripts and unsafe attributes.
Overview
WordPress blocks SVG uploads because an SVG is code. It can carry JavaScript, so allowing uploads without cleaning them opens a security hole.
The usual workarounds are pasting SVG code into blocks or converting crisp logos into blurry PNGs.
Plan: Free + Pro options. The options marked Pro below need WP Extended Pro.
Setup
- Turn on SVG File Upload under Media Tools.
- Upload SVGs to the media library as normal.
- With Pro, choose which roles are allowed to upload them.
Settings
| Setting | What it does | Plan |
|---|---|---|
| Allowed Roles | Select which user roles are allowed to upload SVG files. Leave blank to allow all roles with upload capability. | Pro |
Questions and troubleshooting
Is SVG upload safe?
Each file is sanitised as it is uploaded, removing scripts and unsafe attributes. The sanitiser was hardened in version 3.3.0. For extra caution, limit uploads to trusted roles with Pro.
Is SVG File Upload free?
Yes. Uploading is free. WP Extended Pro adds role restrictions.
It isn’t working as expected
Check the module is switched on and its settings are saved. If another plugin does the same job, deactivate one of them. Then clear any page cache and test again. Still stuck? Pro customers can contact support; free users can post on the WordPress.org forum.
Developers
SVG File Upload has 1 hook. See the SVG File Upload developer reference.
