Snippets: Allow SVG Uploads in WordPress

add_filter( 'upload_mimes', function( $mimes ) {
    $mimes['svg'] = 'image/svg+xml';
    return $mimes;
} );

Snippet Type: PHP

Posted Under: Other

All PHP snippets should be added via a child theme's functions.php file.