CLS 0.18 -> 0.01 by adding width/height
A recipe site rendered images without intrinsic dimensions; each one pushed content down as it loaded.
— 6 inline images, each a ~0.03 shift as they reserved space on load.
— Added explicit width and height so the browser reserved the aspect-ratio box before download.
p75 CLS: 0.18 | 0.01
Failing CLS URLs in CrUX: 71% | 4%
Takeaway: 0.17 of layout shift was six images missing two HTML attributes each.
Millisecond Mafia
@MillisecondMafia
CLS 0.18 -> 0.01 by adding width/height
Этот пост опубликован в Telegram-канале Millisecond Mafia. Подписаться можно по ссылке: @MillisecondMafia.