PERF005 · LCP image eager loading
Severity: warning
What it checks
Section titled “What it checks”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.
Why it matters
Section titled “Why it matters”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.
How to fix
Section titled “How to fix”Remove loading="lazy" from the first/LCP image and consider fetchpriority="high":
<img src="/hero.jpg" width="1200" height="630" fetchpriority="high" alt="…" />