Created
September 3, 2018 16:42
-
-
Save bmdinteractive/7105e8c5abb85f3b8ca4bff131f4a6e9 to your computer and use it in GitHub Desktop.
Add SVG to allowable mime types in WordPress
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
function mime_types($mimes) { | |
// Enable SVG | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter( 'upload_mimes', 'mime_types' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment