You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Auto-sizes: fall back to next value in sizes if the image is not lazy-loading #9648
This may be somewhat off-topic (please feel free to redirect me, if so) but one aspect of the parsing algorithm is still unclear to me. If a platform (e.g. WordPress) generated image markup that looks like this (note the omission of a loading="lazy" attribute):
Would the omission of the loading attribute cause sizes to be calculates as the default 100vw value, would the 200px value be respected, or would size containment come into play? I would hope that the the "200px" value would be respected in this case so that platforms could add auto to the beginning of a sizes and dynamically decide whether to add a loading attribute while constructing the markup. In other words, if auto can't be applied because the image is not being lazy loaded, then the browser should respect the next items in the media condition.
Didn't make it conforming to use auto when it's not allowed. I think it will be confusing for most people and might restrict us from making auto have an effect in more cases in the future.
Activity
Fix bugs in source parser
zcorpan commentedon Sep 5, 2023
Proposed fix as part of #9493
Didn't make it conforming to use
autowhen it's not allowed. I think it will be confusing for most people and might restrict us from makingautohave an effect in more cases in the future.manisha765 commentedon Sep 14, 2023
Fix bugs in source parser
Force size containment for auto-sizes