Image optimization strategies

One route per technique, from unoptimized to fully optimized. Each renders the same 20-image dataset as a responsive grid; each grid item links to a large detail view (the LCP element). Run the Lighthouse harness againstnetlify serve (port 8888) to compare LCP, CLS, and bytes.

Strategies

Measured results

StrategyLCP (ms)CLSBytes (KB)
naive48760.0119179
manual7490.000940
auto15290.000511
pixel-perfect10010.000231
lqip12540.000528
cropped16000.000546
final10770.000248

Cold-cache Lighthouse 13 medians (3 runs each). A warm browser reload is faster and is not a fair strategy comparison — see the README.

Key findings

  • Bytes wins go to pixel-perfect and final — 231 KB and 248 KB, ~55% under auto (511 KB) and 97% under naive. Exact sizes + widths derived from layout tokens means the CDN serves the slot file with no slack.
  • LQIP does not improve LCP — its LCP (1254 ms) is worse than auto (1529 ms). Lighthouse records LCP when the full image is visible — after the fade-in fires — so the placeholder adds latency, not savings. LQIP's payoff is perceived speed: the user sees content at ~200 ms even though the metric clock runs longer.
  • manual wins LCP (749 ms) — hand-cut files served directly from public/, no CDN transform roundtrip on /.netlify/images.
  • final is the production pick — matches pixel-perfect on bytes (248 KB) while LQIP delivers instant visual feedback. The 76 ms LCP delta vs pixel-perfect is the cost of the fade.