Open Bug 1400410 Opened 2 years ago Updated 1 year ago

img tag sizes attribute doesn't support all media condition forms


(Core :: Layout: Images, Video, and HTML Frames, defect, P3)

55 Branch



Tracking Status
firefox57 --- wontfix


(Reporter: bart, Unassigned)




(1 file)

Attached file test.html
User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:55.0) Gecko/20100101 Firefox/55.0
Build ID: 20170816210634

Steps to reproduce:

Load the attached test case. Resize the browser narrower and wider than 600px. Observe the images.

The test case has three img tags with the same srcset but different sizes parameters. The first uses "(min-width: 601px)" to choose the 1200x600 image. The second uses "not (max-width: 600px)". The third uses "(width > 600px)". I believe all are valid media conditions.


Actual results:

The first image switches between sources. The second and third display only the 600x200 source at all viewport sizes.

Expected results:

All three images should behave the same way.

Chrome (with a clear cache, loading the page with a narrow viewport) supports all three. (Resizing larger and then narrower again keeps the larger image visible in Chrome -- see
Component: Untriaged → Layout: Images
Product: Firefox → Core
This sounds a lot like:
Depends on: 1149357
Priority: -- → P3
It really doesn't look like the same thing to me, but I don't know much about browser internals.

Given that the first test case is working fine but the other two are not leads me to believe this issue is separate, and it's simply that media conditions of those two forms aren't yet understood by Firefox.
Yes, I believe that's correct. This may therefore be a duplicate of that or
Product: Core → Core Graveyard
Product: Core Graveyard → Core
You need to log in before you can comment on or make changes to this bug.