Wednesday, May 27, 2020

svg file not upload in wordpress

Cannot upload SVG files in WordPress


When we upload the SVG file, we recieve the notification “Sorry, this file type is not permitted for security reasons.”

To Resolve this issue, we need to add the below function in the functions.php files

function cc_mime_types($mimes) {
 $mimes['svg'] = 'image/svg+xml';
 return $mimes;
}
add_filter('upload_mimes', 'cc_mime_types');

This will resolve the issue.


2 comments:

tejaswini said...

Set aside my effort to peruse all the remarks, however I truly delighted in the article. It's consistently pleasant when you can not exclusively be educated, yet in addition, engaged!360DigiTMG pmp certification in malaysia

360DigiTMG said...


This post is incredibly simple to examine and recognize without disregarding any nuances. Inconceivable work!
360DigiTMG