Quantcast
Channel: WPRecipes
Viewing all articles
Browse latest Browse all 121

How to add SVG upload support to your WordPress blog

$
0
0

Simply add the code below to functions.php in your WordPress theme. SVG upload will be supported once the file is saved.

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

Thanks to dbushell for the snippet!


Viewing all articles
Browse latest Browse all 121

Trending Articles