Loading...
<img
src="/hero.jpg"
loading="lazy"
alt="Team at work"
><img
src="/hero.jpg"
fetchpriority="high"
width="1200"
height="600"
alt="Team at work"
>The hero image is the LCP element, so it loads eagerly with high priority instead of waiting for lazy loading.
loading='lazy' to the hero image, which delays the main content.fetchpriority='high'.<link rel='preload'>.srcset and modern formats, so the hero is not a huge file.2.5 seconds or less at the 75th percentile of visits is good, and over 4 seconds is poor.
Images, <image> inside SVG, video poster images, elements with a CSS background image, and block-level elements with text.
The Performance panel in browser dev tools marks it, and a PerformanceObserver for 'largest-contentful-paint' reports it in code.