This code snippet will add SVG¬†support to WordPress uploader. Paste the code below into the theme’s functions.php.

add_filter( 'upload_mimes', 'add_svg_mime_types' );

function add_svg_mime_types( $mimes=array() ){
	$mimes['svg'] = 'image/svg+xml';
	return $mimes;
}

This code can help when you are presented with the “File type does not meet security guidelines. Try another.” error message.