AI Verified

Name

Enable SVG Uploads

About

This snippet enables the ability to upload SVG files to the WordPress media library.

Language

PHP

Rating

Voted: 1 by 1 user(s)

How to Setup Snippet

Once added, you will be able to upload SVG files to your media library.

Codevault

tunity

Scroll down to see more snippets from this codevault.

Wordpress Compatability

The author has indicated that this snippet is compatable up to wordpress version: 6.1

Our AI bot has checked this snippet is compatable up to wordpress version: 6.1

Code Snippet Plugin Sync

Free & Pro

Download this snippet by clicking the download button, then head over to the Code Snippet Plugin settings in your wordpress admin dashboard, select the import menu then upload this file to import into your wordpress site.

Pro Only (Coming Soon)

You will be able to click a button and sync this snippet to your wordpress site automatically and from your dashboard manage all code snippets across all your wordpress sites that have the Code Snippets Pro plugin installed.

Website/ Profile URL:

tunity.be

Snippet Source:

https://tunity.be/

History

Last modified:

22/01/2024

Important Note

This snippet has the following status:

AI Verified

This snippet has been tested by our AI bot, see any comments below.

AI Bot Comments:

Found 0 vulnerabilities

Enable SVG Uploads

 
                    
1function enable_svg_upload($mimes) {
2 $mimes['svg'] = 'image/svg+xml';
3 return $mimes;
4}
5add_filter('upload_mimes', 'enable_svg_upload');

1

Related Snippets

Please see some snippets below related to this snippet..

Performance

Unverified

1

Convert Uploaded Images to WebP Format

Added: 6 months ago

Last Updated: 4 months ago

Convert Uploaded Images to WebP Format

Performance

AI Verified

1

Remove Google Fonts (Non Elementor)

Added: 1 year ago

Last Updated: 3 months ago

Removed Google Fonts for Non Elementor Websites

Performance

AI Verified

2

Removes WooCommerce styles and scripts from non WooCommerce pages.

Added: 1 year ago

Last Updated: 2 weeks ago

WooCommerce loads all its JavaScript and CSS files on every single page of your website. Even where they are not needed. This makes your website unnecessarily slow. The following code will help you av...

Other Snippets in this Codevault

These are some popular snippets from this users codevault..

Performance

AI Verified

1

Enable SVG Uploads

Added: 1 year ago

Last Updated: 6 months ago

This snippet enables the ability to upload SVG files to the WordPress media library.

WordPress Admin

AI Verified

0

Remove unwanted dashboard widgets

Added: 1 year ago

Last Updated: 1 year ago

This snippet removes unnecessary widgets from the WordPress dashboard, keeping it clean and uncluttered.

Styling

AI Verified

0

Custom Login Logo

Added: 1 year ago

Last Updated: 1 year ago

This snippet allows you to replace the default WordPress login logo with your own custom logo.