w3c / w3c/element-timing

Report image Element Timing algorithm doesn't report intrinsic size for LCP

Open
#31 4 comments 0 reactions 1 assignee View on GitHub

@yoavweiss is already working on this.

Since Aug 9, 2019.

Dominant language
Bikeshed
Stars
61
Forks
19
Avg merge
1d 10h
Merged PRs (30d)
1

Description

My understanding is LCP is supposed to factor in the intrinsic sizes of images and not consider the rendered size for LCP in cases where the image is stretched or enlarged (e.g. a 1px transparent gif).

But as currently spec'ed, the natural width and height of the image are set after 3.5 sub-item 3:

If exposedElement is not null, call the potentially add a LargestContentfulPaint entry algorithm with intersectionRect, imageRequest, renderTime, loadTime, element, and document.

At this point in the algorithm, intersectionRect has only considered the visual width and height, not the intrinsic width and height, thus 3 sub-item 9 in the LCP spec will report the visual size, which I do not believe is the intention.

Let size be width*height.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.