Last active
February 8, 2022 10:26
-
-
Save strsar/c569dccb7bc33f10806fc19370bde7cf to your computer and use it in GitHub Desktop.
[WP] Wordpress - Add svg mime type to WP file upload
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 | |
| function add_svg_mime($mimes) { | |
| $mimes['svg'] = 'image/svg+xml'; | |
| return $mimes; | |
| } | |
| add_filter('upload_mimes', 'add_svg_mime'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment