I have the new 5.8.1 wordpress, but svg in the media uploader aren’t working anymore.
I used this code to integrate svgs:
function cc_mime_types($mimes) {
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');
Why is it not working?
2
Answers
You first need to mention the file type and extension.
here is my code for that !
After WP 4.7 you dont need to use svg+xml with your current code OR you have to specify file type as example below
You can check alot of different solutions here – https://wordpress.stackexchange.com/questions/313951/how-to-upload-svg-in-wordpress-4-9-8