Report image Element Timing algorithm doesn't report intrinsic size for LCP
@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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.