Created
August 26, 2021 22:27
-
-
Save taotiwordpress/b373331e95be7355eb88fe6420cc88c1 to your computer and use it in GitHub Desktop.
[allow svg upload] function to make the media library support svgs #svg #image #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 cc_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'cc_mime_types'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment