We use cookies on this website to provide better user experience.Learn more

Allow SVG-File Uploads via Checkbox in Customizer

1

Using SVG Files for logos etc. allows sharp results in any resolution. Unfortunately the feature to upload svg-files to the WordPress Media is disabled by default. To enable it you’d have to add the following code to your functions.php:

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

It would be nice if this could be activated directly through the customizer.
Cheers

3 Comments

Leave a Comment

Your email address will not be published. Required fields are marked *

Page Builder Framework

A Page Builder’s best friend.

Sign up for the Newsletter
Join the Community