Should Image Prioritizer explicitly mark `IMG` tags which are never LCP elements as `fetchpriority=low`

Aperta
#1,967 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
php
Ambito
performance

Direzione di ricerca

Inizia esaminando l’entry point di Image Prioritizer e l’articolo di Chrome sulla prioritizzazione delle immagini indicato dal link. Riproduci il comportamento di rete descritto con immagini non LCP nel viewport iniziale, quindi determina se gli hint fetchpriority espliciti producono un vantaggio misurabile. Il lavoro è completato quando si è giunti a una decisione chiara sull’opportunità di apportare una modifica concreta.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

[Plugin] Image Prioritizer Needs Discussion

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 with low priority (unless loading=lazy in which case it is not loaded initially at all if not in the viewport). When Chrome determines that an IMG will be in the viewport, then it bumps the priority from medium (or low) up to high since it could be the LCP image. Image Prioritizer improves performance here by ensuring that the LCP image will have the high priority from the start so the browser doesn't have to wait for layout to bump the priority to high. 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 LCP IMG. For example:

Image

The LCP image is successfully downloaded first, but you can see it is still downloading after the other images finish:

Image

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 with high priority once layout places them in the viewport, even if they have fetchpriority=medium.

This being said, this issue could be a quick one to close, but I wanted to open it just to discuss.

Lingua principale
PHP
Stelle
467
Fork
171
Merge medio
13h 21m
PR unite (30g)
32

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WordPress/performance

Tutte le issue di WordPress/performance

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.