Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Intent to experiment: infer aspect-ratio from width and height attributes in images

49 views
Skip to first unread message

Emilio Cobos Álvarez

unread,
Jun 27, 2019, 10:27:12 AM6/27/19
to dev-pl...@lists.mozilla.org, fantasa...@inkedblade.net, Jen Simmons
Hi,

In bug 1547231 I've landed a change to how we determine the intrinsic
aspect ratio of an image so that it's used from the width and height
attributes, even if the width and height are overridden via CSS.

This means that we can get a proper intrinsic size while the image is
loading, for example, instead of giving it a 0x0 size, which avoids
layout instability.

This change is enabled on nightly and early-beta, with the hope of
proving it's web-compatible.

See the following for related discussion:

* https://github.com/WICG/intrinsicsize-attribute/issues/16
* https://github.com/WICG/intrinsicsize-attribute/issues/4
* https://github.com/mozilla/standards-positions/issues/129

Note that, as implemented, the mapped aspect ratio trumps the actual
image aspect-ratio, but this can probably be changed if it breaks
content as discussed in the issues above.

Anyhow, let me know / file bugs if you see broken stuff :)

-- Emilio
0 new messages