Created
August 29, 2015 09:29
-
-
Save neilgee/cc5196336fa48bb024fa to your computer and use it in GitHub Desktop.
Add SVG to WordPress via Media Uploader
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
<?php // <~ don't add me in | |
add_filter('mime_types', 'themeprefix_add_svg_images'); | |
//Allow SVG Images Via Media Uploader | |
function themeprefix_add_svg_images($mimetypes) { | |
$mimetypes['svg'] = 'image/svg+xml'; | |
return $mimetypes; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment