SVG - Sorry, This File Type Is Not Permitted for Security Reasons.

Add the following code in the theme’s functions.php file.

 function my_custom_mime_types( $mimes ) {
    // New allowed mime types.
    $mimes['svg'] = 'image/svg+xml';

    return $mimes;
}
add_filter( 'upload_mimes', 'my_custom_mime_types' );


Then put the below line on the top of svg file.

 <?xml version="1.0" encoding="utf-8"?>