Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// Place this in functions.php of your theme
function example_mime_types($mimes) {
if( ! current_user_can( 'administrator' ) ) {
return $mimes;
$mimes['svg'] = 'image/svg+xml';
return $mimes;
}
add_filter('upload_mimes', 'example_mime_types');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment