Intent to Ship: EXIF-based intrinsic image sizing

241 views
Skip to first unread message

Eric Portis

unread,
May 5, 2021, 7:27:48 PM5/5/21
to blin...@chromium.org

Contact emails
er...@cloudinary.com, noam.j.r...@gmail.com

Explainer
https://github.com/eeeps/exif-intrinsic-sizing-explainer

Specification
https://github.com/whatwg/html/pull/5574

Summary
Allows image resources to declare their own intrinsic density and dimensions, using EXIF metadata. Currently, images on the web are assigned a default intrinsic density of 1x, and assigned intrinsic widths and heights based on their pixel counts. Allowing resources to declare their own intrinsic size gives image authoring tools and servers the ability to generate and/or serve non-1x images (e.g., 2x screenshots, or low-quality image placeholders) without breaking layouts.

Blink component
Blink>Image

Search tags
Image, EXIF

TAG review
None

TAG review status
Not applicable

Risks

Interoperability and Compatibility

Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1680387)

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=212405)

Web developers: No signals

Is this feature fully tested by web-platform-tests?
Yes

Flag name

Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1069755

Launch bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1069755

Link to entry on the Chrome Platform Status
https://www.chromestatus.com/feature/5177624026415104

This intent message was generated by Chrome Platform Status.

Eric Portis
Cloudinary

Eric Portis

unread,
May 5, 2021, 7:32:31 PM5/5/21
to blin...@chromium.org

Note that this feature has been shipping in Chromium since October of last year, but was never shepherded through the official Blink launch process. This Intent to Ship is part of rectifying that.

Eric Portis
Cloudinary

Emilio Cobos Álvarez

unread,
May 5, 2021, 9:28:01 PM5/5/21
to Eric Portis, blin...@chromium.org
Thanks for sending this intent.

On 5/6/21 01:32, 'Eric Portis' via blink-dev wrote:
> Note that this feature has been shipping in Chromium since October of
> last year
> <https://chromium.googlesource.com/chromium/src.git/+/86ae1272b4a60b42439bc115777bb916fa3a6720>,
> but was never shepherded through the official Blink launch process. This
> Intent to Ship is part of rectifying that.
>
> Eric Portis
> Cloudinary <https://cloudinary.com>
>
> On 5 May 2021, at 16:27, Eric Portis wrote:
>
> *Contact emails*
> er...@cloudinary.com <mailto:er...@cloudinary.com>,
> noam.j.r...@gmail.com <mailto:noam.j.r...@gmail.com>
>
> *Explainer*
> https://github.com/eeeps/exif-intrinsic-sizing-explainer
> <https://github.com/eeeps/exif-intrinsic-sizing-explainer>
>
> *Specification*
> https://github.com/whatwg/html/pull/5574
> <https://github.com/whatwg/html/pull/5574>

It'd be great if this got actually landed. I might try to find some time
to do this, but it's a bit disappointing that this shipped in two
engines with only a spec PR.

> *Summary*
> Allows image resources to declare their own intrinsic density and
> dimensions, using EXIF metadata. Currently, images on the web are
> assigned a default intrinsic density of 1x, and assigned intrinsic
> widths and heights based on their pixel counts. Allowing resources
> to declare their own intrinsic size gives image authoring tools and
> servers the ability to generate and/or serve non-1x images (e.g., 2x
> screenshots, or low-quality image placeholders) without breaking
> layouts.
>
> *Blink component*
> Blink>Image <Blink%3EImage>
>
> *Search tags*
> Image <https://www.chromestatus.com/features#tags:Image>, EXIF
> <https://www.chromestatus.com/features#tags:EXIF>
>
> *TAG review*
> None
>
> *TAG review status*
> Not applicable
>
> *Risks*
>
> *Interoperability and Compatibility*
>
> Gecko: Shipped/Shipping
> (https://bugzilla.mozilla.org/show_bug.cgi?id=1680387
> <https://bugzilla.mozilla.org/show_bug.cgi?id=1680387>)

Note that this is not quite true. The patch landed on Nightly _today_,
so it's going to take a while till it ships on a release. In fact
there's still some work around canvas I need to do.

-- Emilio

> WebKit: Shipped/Shipping
> (https://bugs.webkit.org/show_bug.cgi?id=212405
> <https://bugs.webkit.org/show_bug.cgi?id=212405>)
>
> Web developers: No signals
>
> *Is this feature fully tested by web-platform-tests
> <https://chromium.googlesource.com/chromium/src/+/master/docs/testing/web_platform_tests.md>?*
> Yes
>
> *Flag name*
>
> *Tracking bug*
> https://bugs.chromium.org/p/chromium/issues/detail?id=1069755
> <https://bugs.chromium.org/p/chromium/issues/detail?id=1069755>
>
> *Launch bug*
> https://bugs.chromium.org/p/chromium/issues/detail?id=1069755
> <https://bugs.chromium.org/p/chromium/issues/detail?id=1069755>
>
> *Link to entry on the Chrome Platform Status*
> https://www.chromestatus.com/feature/5177624026415104
> <https://www.chromestatus.com/feature/5177624026415104>
>
> This intent message was generated by Chrome Platform Status
> <https://www.chromestatus.com/>.
>
> —
> Eric Portis
> Cloudinary
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/305224F2-E49E-4917-9C60-A9E0EA17A98E%40cloudinary.com
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/305224F2-E49E-4917-9C60-A9E0EA17A98E%40cloudinary.com?utm_medium=email&utm_source=footer>.

Yoav Weiss

unread,
May 6, 2021, 5:42:55 AM5/6/21
to Eric Portis, blink-dev
Thanks for sending this (belated) intent!

On Thu, May 6, 2021 at 1:27 AM 'Eric Portis' via blink-dev <blin...@chromium.org> wrote:

Any blockers for landing the PR?
 

Summary
Allows image resources to declare their own intrinsic density and dimensions, using EXIF metadata. Currently, images on the web are assigned a default intrinsic density of 1x, and assigned intrinsic widths and heights based on their pixel counts. Allowing resources to declare their own intrinsic size gives image authoring tools and servers the ability to generate and/or serve non-1x images (e.g., 2x screenshots, or low-quality image placeholders) without breaking layouts.

Blink component
Blink>Image

Search tags
Image, EXIF

TAG review
None

TAG review status
Not applicable

Risks

Interoperability and Compatibility

Gecko: Shipped/Shipping (https://bugzilla.mozilla.org/show_bug.cgi?id=1680387)

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=212405)

It doesn't seem like the patch has landed, so I don't think "shipping" is the appropriate status here

Web developers: No signals

I'd say that Cloudinary funding that work is a pretty strong signal :P Have you heard from e.g. other image CDNs about this? 

Is this feature fully tested by web-platform-tests?
Yes

Flag name

Tracking bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1069755

Launch bug
https://bugs.chromium.org/p/chromium/issues/detail?id=1069755

Link to entry on the Chrome Platform Status
https://www.chromestatus.com/feature/5177624026415104

This intent message was generated by Chrome Platform Status.

Eric Portis
Cloudinary

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/87F4E773-CBA8-4595-8C55-A8868F764DEA%40cloudinary.com.

Eric Portis

unread,
May 6, 2021, 7:51:36 PM5/6/21
to Yoav Weiss, Emilio Cobos Álvarez, blink-dev

On 5 May 2021, at 18:27, Emilio Cobos Álvarez wrote:

It'd be great if this got actually landed. I might try to find some time to do this, but it's a bit disappointing that this shipped in two engines with only a spec PR.

Agree on both. Apologies for the oversight!

Note that this is not quite true. The patch landed on Nightly _today_, so it's going to take a while till it ships on a release. In fact there's still some work around canvas I need to do.

Makes sense; I’ve changed the Gecko status on chromestatus.com from “Shipped/Shipping” to “In development”.

On 6 May 2021, at 2:42, Yoav Weiss wrote:

Any blockers for landing the PR?

My read is:

  • We may need to wait for the image-resolution and image-orientation specifications to catch up with implementations regarding the CORS issues brought up here https://github.com/w3c/csswg-drafts/issues/5165. I don’t think anything is blocking that work, but no one has done it yet.
  • Ditto re: https://github.com/w3c/csswg-drafts/issues/6241, although this can probably happen in parallel.
  • It would also be nice if https://github.com/w3c/csswg-drafts/issues/4929 landed, but I also don’t think this is a blocker.
  • We need a bit more test coverage, re:
    • the CORS issues, above
    • image-orientation + EXIF-based intrinsic sizing interaction
    • (many thanks to @emilio for identifying and rectifying the lack of tests regarding interactions with srcset and image-set).
  • At one point, we needed a second reviewer. Not sure if @emilio’s recent attention counts; I’ll ping @domenic either way.
  • The PR needs a bit of (non-substantive) spit and polish. I can get started on that as well.

WebKit: Shipped/Shipping (https://bugs.webkit.org/show_bug.cgi?id=212405)

It doesn't seem like the patch has landed, so I don't think "shipping" is the appropriate status here

Hm, the feature landed in WebKit last October (https://trac.webkit.org/changeset/268886/webkit) and Safari Technology Preview soon after that. It finally shipped in Safari proper in version 14.1 (just a week ago). Let me follow up with Noam about why the issue I linked to is not closed.

Web developers: No signals

I'd say that Cloudinary funding that work is a pretty strong signal :P Have
you heard from e.g. other image CDNs about this?

A number of image CDNs support some version of the responsive image client hints (off the top of my head: both ImageEngine and ImgIX do); I expect that once the Content-DPR response header is fully depreciated and replaced by EXIF-based intrinsic sizing, they will readily embrace EXIF-sizing for that use case.

A number of individual developers have reacted positively, informally, about the other use cases (e.g., LQIPs). Perhaps I should see if I can get that reaction in a more public and formal way.


Eric Portis
Cloudinary

Chris Harrelson

unread,
May 13, 2021, 5:11:36 PM5/13/21
to Eric Portis, Yoav Weiss, Emilio Cobos Álvarez, blink-dev
Hi Eric, checking in on this again from the API owners.

We're really hoping the PR for this can land as part of shipping. Do you have the support and help you need?

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Daniel Bratell

unread,
May 20, 2021, 2:34:18 PM5/20/21
to Chris Harrelson, Eric Portis, Yoav Weiss, Emilio Cobos Álvarez, blink-dev

Friendly ping. Just checking on the status of the PR for the HTML spec.

/Daniel

Eric Portis

unread,
May 21, 2021, 1:51:29 PM5/21/21
to Daniel Bratell, Chris Harrelson, Yoav Weiss, Emilio Cobos Álvarez, blink-dev
On 20 May 2021, at 11:34, Daniel Bratell wrote:

> Friendly ping. Just checking on the status of the PR for the HTML
> spec.

On 2021-05-13 23:11, Chris Harrelson wrote:

> We're really hoping the PR for this can land as part of shipping. Do
> you have the support and help you need?


I believe I do; everything on the todo list outlined earlier seems
achievable. Might take a few weeks, though.



Eric Portis
Cloudinary

Mike West

unread,
Jun 10, 2021, 4:22:54 AM6/10/21
to Eric Portis, Daniel Bratell, Chris Harrelson, Yoav Weiss, Emilio Cobos Álvarez, blink-dev
Hey, Eric!

Friendly ping on the spec PR. It looks like you made some progress with Simon Pieters ~2 weeks ago, but things have stalled since that rebasing effort. Is this still on y'all's radar?

-mike


--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Eric Portis

unread,
Jun 15, 2021, 4:56:00 PM6/15/21
to Mike West, Daniel Bratell, Chris Harrelson, Yoav Weiss, Emilio Cobos Álvarez, blink-dev

Thanks for the ping!

It is still very much on my/our radar. I have a scheduled sync with Simon this Thursday to talk through where we’re at and plan to pick up where he left off.

Eric Portis
Cloudinary

Yoav Weiss

unread,
Jun 25, 2021, 4:48:08 AM6/25/21
to blink-dev, Eric Portis, Daniel Bratell, Chris Harrelson, Yoav Weiss, Emilio Cobos Alvarez, blink-dev, Mike West
Exciting to see progress on the PR. Looking forward to it landing! :)

On Tuesday, June 15, 2021 at 10:56:00 PM UTC+2 Eric Portis wrote:

Thanks for the ping!

It is still very much on my/our radar. I have a scheduled sync with Simon this Thursday to talk through where we’re at and plan to pick up where he left off.

Eric Portis
Cloudinary

On 10 Jun 2021, at 1:22, Mike West wrote:

Hey, Eric!

Friendly ping on the spec PR. It looks like you made some progress with Simon Pieters ~2 weeks ago, but things have stalled since that rebasing effort. Is this still on y'all's radar?

-mike


On Fri, May 21, 2021 at 7:51 PM 'Eric Portis' via blink-dev <blin...@chromium.org> wrote:
On 20 May 2021, at 11:34, Daniel Bratell wrote:

> Friendly ping. Just checking on the status of the PR for the HTML
> spec.

On 2021-05-13 23:11, Chris Harrelson wrote:

> We're really hoping the PR for this can land as part of shipping. Do
> you have the support and help you need?


I believe I do; everything on the todo list outlined earlier seems
achievable. Might take a few weeks, though.



Eric Portis
Cloudinary

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.

Eric Portis

unread,
Jul 8, 2021, 4:56:12 PM7/8/21
to blink-dev

Update: with a whole lot of help from Simon Pieters and Noam Rosenthal, we accomplished everything on the todo list (or determined it’s not actually blocking), and perhaps most importantly, the HTML spec PR has been merged.

Some details on the todos:

On 6 May 2021, at 16:51, Eric Portis wrote:

- We may need to wait for the `image-resolution` and `image-orientation` specifications to catch up with implementations regarding the CORS issues brought up here https://github.com/w3c/csswg-drafts/issues/5165. I don’t think anything is blocking that work, but no one has done it yet.

CSS image-resolution() is not actually shipping anywhere yet, and it’s not clear that it ever will. It should not block EXIF-based intrinsic sizing.

If image-resolution() is implemented, explicit resolutions (e.g., 2dppx) will stack on top of EXIF resolutions, making the fact that resolution modification was done via EXIF undetectable. The from-image keyword, though, would have to work differently in same-origin and cross-origin contexts. Rather than stating this explicitly in the current spec, Simon put out a call to see if there are actually use cases for from-image or image-resolution(); if there are not, they can be dropped.

- Ditto re: https://github.com/w3c/csswg-drafts/issues/6241, although this can probably happen in parallel.

The CSSWG had previously resolved to align the image-set() spec with the current implementations. That hasn’t happened yet, but the existing implementations agree, and Simon added Web Platform Tests for image-set() + EXIF-based intrinsic sizing interaction.

- It would also be nice if https://github.com/w3c/csswg-drafts/issues/4929 landed, but I also don’t think this is a blocker.

When I wrote this, the spec change re: metadata/data order had already landed and Web Platform Tests already existed (yay/oops). Test results show that Blink-based browsers fail these tests; see the Chromium issue for this.

- We need a bit more test coverage, re:
- the CORS issues, above

Added, see above for the image-set() interaction tests. Simon also added tests for cross-origin resources loaded in other contexts.

- `image-orientation` + EXIF-based intrinsic sizing interaction

Not actually pertinent for EXIF-based intrinsic sizing.

- At one point, we needed a second reviewer. Not sure if @emilio’s recent attention counts; I’ll ping @domenic either way.

Simon reivewed; Domenic also reviewed. Noam addressed all blocking concerns, and…

- The PR needs a bit of (non-substantive) spit and polish. I can get started on that as well.

…added the necessary polish for the PR to land.

Any further questions or concerns on the Blink shipping process side of things?

Eric Portis
Cloudinary

Yoav Weiss

unread,
Jul 8, 2021, 5:16:31 PM7/8/21
to Eric Portis, blink-dev
Thanks Eric, Noam, Simon and Domenic for seeing this through and getting the PR to land!

LGTM1

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Manuel Rego Casasnovas

unread,
Jul 9, 2021, 12:23:05 AM7/9/21
to Yoav Weiss, Eric Portis, blink-dev
Yeah, thanks for the effort on getting the PR merged.

LGTM2

On 08/07/2021 23:15, Yoav Weiss wrote:
> Thanks Eric, Noam, Simon and Domenic for seeing this through and getting
> the PR to land!
>
> *LGTM1*
>
> On Thu, Jul 8, 2021 at 10:56 PM 'Eric Portis' via blink-dev
> <blin...@chromium.org <mailto:blin...@chromium.org>> wrote:
>
> __
>
> Update: with a whole lot of help from Simon Pieters and Noam
> Rosenthal, we accomplished everything on the todo list (or
> determined it’s not actually blocking), and perhaps most
> importantly, the HTML spec PR has been merged
> <https://github.com/whatwg/html/pull/5574#event-4996610405>.
>
> Some details on the todos:
>
> On 6 May 2021, at 16:51, Eric Portis wrote:
>
> - We may need to wait for the `image-resolution` and
> `image-orientation` specifications to catch up with
> implementations regarding the CORS issues brought up here
> https://github.com/w3c/csswg-drafts/issues/5165
> <https://github.com/w3c/csswg-drafts/issues/5165>. I don’t think
> anything is blocking that work, but no one has done it yet.
>
> CSS |image-resolution()| is not actually shipping anywhere yet, and
> it’s not clear that it ever will. It should not block EXIF-based
> intrinsic sizing.
>
> If |image-resolution()| is implemented, explicit resolutions (e.g.,
> |2dppx|) will stack on top of EXIF resolutions, making the fact that
> resolution modification was done via EXIF undetectable. The
> |from-image| keyword, though, would have to work differently in
> same-origin and cross-origin contexts. Rather than stating this
> explicitly in the current spec, Simon put out a call
> <https://github.com/w3c/csswg-drafts/issues/6317> to see if there
> are actually use cases for |from-image| or |image-resolution()|; if
> there are not, they can be dropped.
>
> - Ditto re: https://github.com/w3c/csswg-drafts/issues/6241
> <https://github.com/w3c/csswg-drafts/issues/6241>, although this
> can probably happen in parallel.
>
> The CSSWG had previously resolved
> <https://github.com/w3c/csswg-drafts/issues/6241#issuecomment-828614908>
> to align the |image-set()| spec with the current implementations.
> That hasn’t happened yet, but the existing implementations agree,
> and Simon added Web Platform Tests
> <https://github.com/web-platform-tests/wpt/pull/29137> for
> |image-set()| + EXIF-based intrinsic sizing interaction.
>
> - It would also be nice if
> https://github.com/w3c/csswg-drafts/issues/4929
> <https://github.com/w3c/csswg-drafts/issues/4929> landed, but I
> also don’t think this is a blocker.
>
> When I wrote this, the spec change re: metadata/data order had
> already landed
> <https://github.com/w3c/csswg-drafts/issues/4929#issuecomment-724252303>
> and Web Platform Tests already existed
> <https://github.com/web-platform-tests/wpt/pull/26915> (yay/oops).
> Test results
> <https://wpt.fyi/results/css/css-images/image-orientation/image-orientation-exif-png.html?label=experimental&label=master&aligned&q=css%2Fcss-images%2Fimage-orientation%2Fimage-orientation-exif-png.html>
> show that Blink-based browsers fail these tests; see the Chromium
> issue for this
> <https://bugs.chromium.org/p/chromium/issues/detail?id=1159433>.
>
> - We need a bit more test coverage, re:
> - the CORS issues, above
>
> Added, see above for the |image-set()| interaction tests. Simon also
> added tests for cross-origin resources loaded in other contexts
> <https://github.com/web-platform-tests/wpt/pull/29411>.
>
> - `image-orientation` + EXIF-based intrinsic sizing interaction
>
> Not actually pertinent for EXIF-based intrinsic sizing.
>
> - At one point, we needed a second reviewer. Not sure if
> @emilio’s recent attention counts; I’ll ping @domenic either way.
>
> Simon reivewed
> <https://github.com/whatwg/html/pull/5574#pullrequestreview-686138713>;
> Domenic also reviewed
> <https://github.com/whatwg/html/pull/5574#pullrequestreview-686757235>.
> Noam addressed all blocking concerns, and…
>
> - The PR needs a bit of (non-substantive) spit and polish. I can
> get started on that as well.
>
> …added the necessary polish for the PR to land.
>
> Any further questions or concerns on the Blink shipping process side
> of things?
>
> Eric Portis
> Cloudinary <https://cloudinary.com>
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/14EA3332-A875-4137-95A5-2042E2F7C82A%40cloudinary.com?utm_medium=email&utm_source=footer>.
>
> --
> You received this message because you are subscribed to the Google
> Groups "blink-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to blink-dev+...@chromium.org
> <mailto:blink-dev+...@chromium.org>.
> To view this discussion on the web visit
> https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfX%2BoxPbyQB-2%3Dg7es%2B03xHci1O74sRHej%3DZu%2B_E1MSvkw%40mail.gmail.com
> <https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAL5BFfX%2BoxPbyQB-2%3Dg7es%2B03xHci1O74sRHej%3DZu%2B_E1MSvkw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Mike West

unread,
Jul 12, 2021, 9:17:07 AM7/12/21
to Manuel Rego Casasnovas, Yoav Weiss, Eric Portis, blink-dev
LGTM3.

Thank you!

-mike


To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/bf25bd73-b1d3-7c48-5eb9-81a43c032d57%40igalia.com.
Reply all
Reply to author
Forward
0 new messages