Skip to content

Instantly share code, notes, and snippets.

@benfrain
benfrain / allowSVG.php
Created March 8, 2014 00:05
Allow SVG upload and preview to Media area of Wordpress (add this to functions.php)
function custom_mtypes( $m ){
$m['svg'] = 'image/svg+xml';
$m['svgz'] = 'image/svg+xml';
return $m;
}
add_filter( 'upload_mimes', 'custom_mtypes' );