Last active
April 5, 2022 13:32
-
-
Save dividezigns/31b2e3cdb4b298ac3652372c8d874097 to your computer and use it in GitHub Desktop.
This code will enable SVG upload in WordPress. Place this code in your functions.php file in the child theme directory.
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
<?php | |
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