• Resolved Gulshan Kumar

    (@thegulshankumar)


    Hello!

    I am trying to import my SVG logo in my subdirectory WP where I have exmage installed.

    The Logo URL successfully returns 200. There is no firewall or anything that can block.

    https://www.gulshankumar.net/wp-content/uploads/2022/10/logo.svg

    I have installed ‘Safe SVG’ for compatability.

    Returns

    https://www.gulshankumar.net/wp-content/uploads/2022/10/logo.svg =>Invalid or not supported image URL

    I deactivated Safe SVG, and added below constant & filter as suggested similarly in other thread for AVIF.

    I tried below things.

    define('ALLOW_UNFILTERED_UPLOADS', true);
    add_filter( 'exmage_get_supported_mime_types', function ( $mime_types ) {
    	$mime_types[] = 'image/svg';
    
    	return $mime_types;
    } );

    Again, same issue.

    Could you please include support for SVG in exmage? It’s very common format.

    Thanks in advanced

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Gulshan Kumar

    (@thegulshankumar)

    Oh my bad. The mime-type was wrong. It should be image/svg+xml instead of image/svg 🙂

    Solution

    If anyone is looking for SVG support, try this. It works for me.

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

    Thanks! This plugin is life saver.

    • This reply was modified 3 years, 5 months ago by Gulshan Kumar.

    I appreciate you telling us this. Please get in touch with us if you require any additional assistance.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Request for SVG support’ is closed to new replies.