Picture element displays no image if type="image/webp" entry is present.
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.
Vsi odgovori (8)
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.
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.
Spremenil RSteinwand
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.
Spremenil RSteinwand
This looks like bug 1045532 -- Type selection doesn't currently work, but should before picture is enabled by default.
Thanks John.
Saves me from having to do more.
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?
This fix only landed on mozilla-central (see comment 12), so only the Nightly 36.0a1 builds have it so far.
Thanks.