The snippet to allow SVG upload from WPCode's library
Posted: Tue Jan 21, 2025 5:18 am
The easiest way to securely enable SVG uploads in WordPress is to use WPCode , the most powerful code snippet plugin on the market.
WPCode has a large library of pre-configured code snippets that can replace many one-time use plugins on your website. It includes the snippets to disable pages with attachments , keep the classic post editor , and allow SVG file uploads - all without the risk of breaking your website.
To get started, you'll need to install and activate the free WPCode plugin . For detailed instructions, see our step-by-step guide on how to install a WordPress plugin .
Once activated, you need to navigate to Code Snippets » Add Snippet in your WordPress admin panel . Simply search for “svg” and hover over “Allow SVG Files Upload”.
Click “Use Snippet” when it appears.
Next, you will land on the Edit Snippet page, List of Dominican Republic Cell Phone Number where WPCode has already configured all the settings the code needs to run.
All you have to do is click on the “Active” switch and then click on the “Update” button.
Activate the snippet and click update in WPCode
Now you can upload SVG files without WordPress showing you an error or warning message.
You can then treat it like any other image on your WordPress website .
It's a kitty svg that was uploaded thanks to WPCode's library snippet
By default, the WPCode snippet only allows users with the “Administrator” role to add SVGs to WordPress.
WPCode has a large library of pre-configured code snippets that can replace many one-time use plugins on your website. It includes the snippets to disable pages with attachments , keep the classic post editor , and allow SVG file uploads - all without the risk of breaking your website.
To get started, you'll need to install and activate the free WPCode plugin . For detailed instructions, see our step-by-step guide on how to install a WordPress plugin .
Once activated, you need to navigate to Code Snippets » Add Snippet in your WordPress admin panel . Simply search for “svg” and hover over “Allow SVG Files Upload”.
Click “Use Snippet” when it appears.
Next, you will land on the Edit Snippet page, List of Dominican Republic Cell Phone Number where WPCode has already configured all the settings the code needs to run.
All you have to do is click on the “Active” switch and then click on the “Update” button.
Activate the snippet and click update in WPCode
Now you can upload SVG files without WordPress showing you an error or warning message.
You can then treat it like any other image on your WordPress website .
It's a kitty svg that was uploaded thanks to WPCode's library snippet
By default, the WPCode snippet only allows users with the “Administrator” role to add SVGs to WordPress.