Last active
October 3, 2020 22:16
-
-
Save dksign/2730c14f902043eed4b57c8b69f2c375 to your computer and use it in GitHub Desktop.
Add support for 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
| // Allow SVG upload | |
| function my_types($mime_types) | |
| { | |
| $mime_types['svg'] = 'image/svg+xml'; //Adding svg extension | |
| return $mime_types; | |
| } | |
| add_filter('upload_mimes', 'my_types', 1, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment