Skip to content

Instantly share code, notes, and snippets.

@PeteMall
Created October 11, 2012 18:08
Show Gist options
  • Save PeteMall/3874379 to your computer and use it in GitHub Desktop.
Save PeteMall/3874379 to your computer and use it in GitHub Desktop.
Add SVG to the allowed mime types in WordPress
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