Skip to content

Instantly share code, notes, and snippets.

@wpgaurav
Created April 9, 2020 10:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wpgaurav/2aca7b2fc93657bb5c9e42b7fee0db68 to your computer and use it in GitHub Desktop.
Save wpgaurav/2aca7b2fc93657bb5c9e42b7fee0db68 to your computer and use it in GitHub Desktop.
Add SVG file format support to WordPress
<?php
// Add these to child theme/theme's functions.php file
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