Created
December 9, 2012 21:19
-
-
Save dbushell/4247060 to your computer and use it in GitHub Desktop.
Add SVG upload support to a WordPress theme
This file contains 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
// add to functions.php in your WordPress theme | |
add_filter('upload_mimes', 'my_upload_mimes'); | |
function my_upload_mimes($mimes = array()) | |
{ | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment