Allow SVG File Uploads Using the WordPress Media Library Uploader

//Add SVG file support for WP Media Library Uploader function cc_mime_types($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; } add_filter('upload_mimes', 'cc_mime_types');
Add this code to your functions.php file or a functionality plugin. Without this, SVG files will be rejected when attempting to upload them through the media uploader.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.