Should Image Prioritizer explicitly mark IMG
tags which are never LCP elements as fetchpriority=low
#1967
Labels
Needs Discussion
Anything that needs a discussion/agreement
[Plugin] Image Prioritizer
Issues for the Image Prioritizer plugin (dependent on Optimization Detective)
Feature Description
After reading How Does Chrome Prioritize Image Requests? from DebugBear, I was reminded that starting with v117, Chrome automatically loads the first 5 images with
medium
priority while everything afterward is loaded withlow
priority (unlessloading=lazy
in which case it is not loaded initially at all if not in the viewport). When Chrome determines that anIMG
will be in the viewport, then it bumps the priority frommedium
(orlow
) up tohigh
since it could be the LCP image. Image Prioritizer improves performance here by ensuring that the LCP image will have thehigh
priority from the start so the browser doesn't have to wait for layout to bump the priority tohigh
. However, I realized that we could consider addressing this from the reverse angle:Should all images which are never LCP which are in the initial viewport get
fetchpriority="medium"
added to them explicitly?The thing is, even though we start loading the LCP image first with the preload link, once other images enter the view then they also get
high
priority which could potentially add network contention for the currently-downloading LCPIMG
. For example:The LCP image is successfully downloaded first, but you can see it is still downloading after the other images finish:
So maybe by adding explicit
fetchpriority=medium
to the other images the LCP image could be loaded faster. Nevertheless, I did try this out and Chrome seems to ignore the hint: it still downloads images withhigh
priority once layout places them in the viewport, even if they havefetchpriority=medium
.This being said, this issue could be a quick one to close, but I wanted to open it just to discuss.
The text was updated successfully, but these errors were encountered: