Created
September 28, 2022 13:49
-
-
Save ruman/1136a9b26a7ea9fa091a8f25eabec38e to your computer and use it in GitHub Desktop.
Hook for wordpress to allow svg type file
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 wp_mime_types($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'wp_mime_types'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment