[resolved] Featured image not showing when using SVG (7 posts)

  1. Swellfire
    Posted 1 year ago #

    After enabling SVG

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

    and setting a featured image to a SVG, the image did not show up.

  2. Did this work on 3.7.1?

  3. Swellfire
    Posted 1 year ago #

    Yes, seems to work fine for me on 3.7.1

  4. OriginalEXE
    Posted 1 year ago #

    It does not work here on 3.7.1 nor 3.8

    It seems WP can't recognize .svg file dimensions so it sets width and height to 1x1.

  5. Swellfire
    Posted 1 year ago #

    Sorry for the confusion, it is working on 3.6.1

    Just updated this local install to 3.7.1 and the svg Featured Image is 1x1 as you mentioned.

  6. Okay, so that's a regression. Can you open a trac ticket and when asked what version of WP it happens in, put 3.7.1?

    I'm marking this resolved because it's not a problem with 3.8 alpha (which is what we try to track here), but it IS a regression, so we should have a ticket :) We have a little different resolved meter here.

  7. Swellfire
    Posted 1 year ago #

    Sounds good. Thanks for the help.

Topic Closed

This topic has been closed to new replies.

About this Topic