Skip to content

PERF005 · LCP image eager loading

Severity: warning

Flags the first <img> in a route’s markup when it has loading="lazy". Static analysis approximates the Largest Contentful Paint image as the first image in document order. This rule runs in static (CLI) analysis only.

Lazy-loading the LCP / above-the-fold image delays the largest paint and hurts Core Web Vitals. The first image is the best static proxy for the LCP candidate, so it should load eagerly.

Remove loading="lazy" from the first/LCP image and consider fetchpriority="high":

<img src="/hero.jpg" width="1200" height="630" fetchpriority="high" alt="" />