Mozilla 도움말 검색

고객 지원 사기를 피하세요. 저희는 여러분께 절대로 전화를 걸거나 문자를 보내거나 개인 정보를 공유하도록 요청하지 않습니다. "악용 사례 신고"옵션을 사용하여 의심스러운 활동을 신고해 주세요.

자세히 살펴보기

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.