Allow SVG uploads to WordPress Media Library

upload-svg-wordpress-media-library
This function allows you to upload svg files to your wordpress media library.
You can this function to your theme’s functions file (functions.php)

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