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"?>
Thursday, November 12, 2020
WordPress