Ce site disposera de fonctionnalités limitées pendant que nous effectuons des opérations de maintenance en vue de vous proposer un meilleur service. Si un article ne règle pas votre problème et que vous souhaitez poser une question, notre communauté d’assistance est prête à vous répondre via @FirefoxSupport sur Twitter, et /r/firefox sur Reddit.

Rechercher dans l’assistance

Évitez les escroqueries à l’assistance. Nous ne vous demanderons jamais d’appeler ou d’envoyer un SMS à un numéro de téléphone ou de partager des informations personnelles. Veuillez signaler toute activité suspecte en utilisant l’option « Signaler un abus ».

En savoir plus

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

  • 8 réponses
  • 6 ont ce problème
  • 11 vues
  • Dernière réponse par 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.

Toutes les réponses (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.

Modifié le par 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.

Modifié le par 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.