svg sorry this file type is not permitted for security reasons

Fix to upload SVG file ‘Sorry, This File Type Is Not Permitted For Security Reasons’ WordPress Error.

Did you recently try uploading a file on WordPress, and got an error which said: Sorry, this file type is not supported for security reasons? Well, you’re not alone. This is one of the most common errors users are confronted with. This is perhaps why we thought of writing this tutorial for you. In this WordPress tutorial, we will have an in-depth look on why Sorry, this file type is not permitted for security reasons error is thrown, and how to fix it.

Why do you get this file type is not permitted for security reasons error for upload SVG file in WordPress?

Whenever you try to upload a file in a format different from the formats allowed, you are bound to get this error. By default, WordPress allows you to upload images in .gif, .png, .jpg and .jpeg formats; documents in .xls and .xlsx, .pdf, .ppt, .pptx, .pps and .ppsx, .doc and .docx, and .odt formats; audio in .flv, .mp3, .m4v, .wma, .m4a, .mid, .ogg, .mp4, .wma and .mid formats and videos in .ogv, .mp4, .3gp, .m4v, .avi, .mov, .3g2, .webm, .wmv and .mpg formats. In addition, other file formats like .zip and .key are also allowed. Thus, whenever you try uploading a file in a format that is different than those specified above, WordPress throws an error. Now, let’s have a quick look on how this can be fixed.

So, now go to your functions.php file & open it, then place below code for fix upload a SVG file in to your wordpress website:

Allow SVG through WordPress Media Uploader

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

3 Responses to “svg sorry this file type is not permitted for security reasons”

​Leave a Comment

Comment authors age:




Activator RemoveWAT for Windows 7