-
-
Save TracKer/4c2bf4f023a608629b45707d3884cca6 to your computer and use it in GitHub Desktop.
Allow SVG upload and preview to Media area of Wordpress (add this to functions.php)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function custom_mtypes( $m ){ | |
$m['svg'] = 'image/svg+xml'; | |
$m['svgz'] = 'image/svg+xml'; | |
return $m; | |
} | |
add_filter( 'upload_mimes', 'custom_mtypes' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment