Tutorial Allow SVG through WordPress Media Uploader

by in , 0

For your functions.php file or a functionality plugin:

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

Without this, SVG files will be rejected when attempting to upload them through the media uploader.

Leave a Reply