How to upload SVG in WordPress 4.9.8?

by Sarath   Last Updated September 12, 2018 09:08 AM

I tried uploading after installing different plugins. Even added a filter to functions.php file.

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

But still uploading an SVG gives the following error. SVG upload error



Related Questions





front end post and uploads for custom post type

Updated April 25, 2018 14:08 PM