Last active
March 24, 2021 20:31
-
-
Save jentanbernardus/f64f1492d3187de93f696afdf183605f to your computer and use it in GitHub Desktop.
Enable 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
<?php | |
function gimme_svg($mimes) { | |
$mimes['svg'] = 'image/svg+xml'; | |
return $mimes; | |
} | |
add_filter('upload_mimes', 'gimme_svg'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment