Allow SVG Uploads

Allow SVG Uploads WordPress


// Allow image/svg+xml
function custom_mime_types( $mimes ) {
    // Add SVG to the list of allowed file types.
    $mimes['svg'] = 'image/svg+xml';

    return $mimes;
}
add_filter( 'upload_mimes', 'custom_mime_types' );

Leave the first comment

Hello 🖐 Welcome

I am planning a professional WordPress and Bricks Builder course. If you are Interested register to this newsletter.