Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

ఇంకా తెలుసుకోండి

Picture element displays no image if type="image/webp" entry is present.

  • 8 ప్రత్యుత్తరాలు
  • 6 ఈ సమస్యలు కలిగి ఉన్నాయి
  • 11 వీక్షణలు
  • చివరి సమాధానమిచ్చినది RSteinwand

more options

I'm running the latest beta.

The jpg in a picture element will not display if there's also an entry containing type="image/webp".

Example: http://googlechrome.github.io/samples/picture-element/ (2nd image, butterfly)

Another example (my site): http://www.intercepteft.com/solutions/property_management.html

webP image displays properly in Chrome, jpg appears properly in any browser except FF beta.

I'm running the latest beta. The jpg in a picture element will not display if there's also an entry containing type="image/webp". Example: http://googlechrome.github.io/samples/picture-element/ (2nd image, butterfly) Another example (my site): http://www.intercepteft.com/solutions/property_management.html webP image displays properly in Chrome, jpg appears properly in any browser except FF beta.

ప్రత్యుత్తరాలన్నీ (8)

more options

Did you enable the picture element and have set the dom.image.* prefs to true?

  • dom.image.picture.enabled
  • dom.image.srcset.enabled

With both of these set to true I'm not getting the image.

more options

Thanks.

I suspect I have both those set since I was playing with srcset before picture. Picture allows me to use jpg and webP images, which is why I decided that was the best fit for me, despite later implementation.

I noticed from Fiddler2 (a packet sniffer), FF beta was downloading the webP image, but unable to display anything except the text from the alt tag. So apparently it's not checking for valid image types it can display and instead just using the media tags. So I'm still calling this a bug.

BTW, this does work properly if media tags are used, but for simple images where just the type differs is where the problem lies. The slider at the top of our home page has 3 sizes of jpg and 3 webp images and works nicely. http://www.intercepteft.com

I also noticed a difference in the Chrome vs Firefox implementation and prefer Chrome. If you resize the browser with Chrome, it'll grab the proper image on the fly. Firefox OTOH, needs a page reload to get the proper image for the page width, not a problem when going from wide to narrow, but going from narrow to wide could result in a low resolution image.

న RSteinwand చే మార్చబడినది

more options

Sorry, I was mistaken. My home page only works because I removed the webP portion.

I had hoped I could add a work-around by adding media tags with a really low width (like min-width:300px), but no go.

So how do we officially bug this?

BTW, if srcset is disabled in config and picture is enabled, I do get an image, but it's only the fail-over image. Nothing else works in FF if webP images are used.

న RSteinwand చే మార్చబడినది

more options

This looks like bug 1045532 -- Type selection doesn't currently work, but should before picture is enabled by default.

more options

Thanks John.

Saves me from having to do more.

more options

I see this was fixed over a week ago, but I still can't view an image containing type=webP in latest Aurora if srcset is enabled.

I hate to ask for an ETA, but how long does it take for changes to make into mainstream? Do I have to install a nightly build?

more options

This fix only landed on mozilla-central (see comment 12), so only the Nightly 36.0a1 builds have it so far.