SVG file not upload in wordpress

WordPress doesn't support SVG file uploads by default.

If you upload an SVG image in WordPress, then you will see the following error message: Sorry, this file type is not permitted for security reasons

But you can allow SVG file via below code.

Please add below code in Theme function file :

function uat_mime_types($mimes) {
        $mimes['svg'] = 'image/svg+xml';
        return $mimes;
 }
 add_filter('upload_mimes', 'uat_mime_types');
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.