Created
August 26, 2018 16:36
-
-
Save yanknudtskov/99980f54e0d5445acf89f1a62b0826dc to your computer and use it in GitHub Desktop.
Allow SVG upload in WordPress
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
<?php | |
/** | |
* Allow SVG Upload | |
*/ | |
add_filter('upload_mimes', 'yanco_mime_types'); | |
function yanco_mime_types($mimes) { | |
$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