#500: HTML Horizontal Review: the <img> element

Visit on Github.

Opened Apr 13, 2020

This is a subtask of #499. Please review these three HTML PRs.

Discussions

2020-04-27

Minutes

Tess: Happy for anyone else to have thoughts on this... interesting one is pull #4952. This came up in the CSSWG over the years, wanting to specify an aspect ratio for generating a placeholder. I think Jen Simmons did a bunch of work.

... What ended up landing in HTML is to calculate an aspect ratio based on the content width/height attributes.

... Seems like a clean solution to the problem, reusing existing markup without making things more complicated. Fairly small change.

Rossen: Don't want to revisit the discussion we had about this previously... I don't recall this having been the favourite path forward in the past... we didn't like this solution due to potential impact on existing content. Has anything changed since then?

Tess: I don't recall if anyone did compat analysis. Multiple engines are now shipping this change...

David: I think the way this ended up ... it has fewer compat problems but it's also a little harder for a site to go back and use it effectively.

... Wanted to be able to upgrade CMS software to provide correct aspect ratio for images... by adding a new feature rather than reusing existing feature, means that you could opt in.

Rossen: I recall discussions where this particular method wasn't the most favoured one, so I was curious what changed.

David: I think this was where the most recent discussion ended up. This is the most we can do without adding new syntax to the web. Isn't everything everyone wanted to do with it, but it is a reasonable change.

Tess: I agree. Is there data to suggest that this change was a bad one? Has gecko gotten bug reports from people seeing site breakage?

David: I think the proposal was refined a number of times as a result of bug reports. Hopefully what got merged into the spec was the end result of that process.

Rossen: From the TAG point of view, I don't have any objections or pushback in terms of solving the use case.

... recalling the discussions that happened around working groups, trying to see if this may have been controversial.

... I'll write a comment linking to some of the earlier discussion from CSSWG.

Tess: Removing progress events... people didn't implement them. Firefox implemented, there is a bug for them to remove. Just removing a feature that didn't get traction.

... Spec text around loading completion, making it match reality a bit better. It's not terribly exciting.

... I think we can check off both of these and move on with our lives.

Peter: On the aspect ratio thing... this is using width and height to set the aspect ratio until the image is loaded, but the width and height overload the intrinsic size of the image.

David: But they don't override the aspect ratio once the image is loaded... I guess.

Rossen: I am assuming that the right discussions took place.

Peter: Looks like this will be discussed at the CSSWG F2F, so we can revisit after that.