Allow SVG through WordPress Media Uploader

Add the following to your theme’s functions.php file to allow .svg files to be uploaded through the WordPress media uploader:

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