Which campaign images should load lazily?

Keep a landing page’s first image ready to load and verify when lower illustrations request their files.

Asset preparation2 min read

A landing page opens with a large photo of a yellow kettle. A close-up of its handle sits below two sections of copy. The visitor needs the first photo immediately. The detail can usually wait until the visitor gets closer to it. Decide from the rendered page at each breakpoint, since the same detail might already be visible on a tall desktop screen.

Load the first visible image early

Put the main <img> in the initial HTML with its src and, if available, responsive candidates. Leave off loading="lazy", or use loading="eager" if your component requires an explicit value. If the image is the page's Largest Contentful Paint (LCP) element, try fetchpriority="high" on that image. It is a priority hint. Keep the URL in the markup so the browser can discover it early. Chrome's LCP guide explains discovery and priority.

For the handle detail, use loading="lazy" if it sits well below the first viewport. Give both images their intrinsic width and height and let the layout size them responsively. Use the actual ratio of each image. Lazy loading controls when a request starts. Dimensions reserve space while the bytes arrive. The browser may start loading a lazy image before it enters the viewport. HTML image loading model

Compare two cold loads

  1. Open a preview in Chrome DevTools. Use the same viewport and network throttling for both runs. In Network, disable the cache while DevTools is open. Reload and stay at the top of the page.
  2. Record a Performance trace and identify the LCP element. In the Network waterfall, note when the kettle photo and handle detail start relative to the document. If a service worker or memory cache supplied a file, clear that variable before comparing.
  3. Toggle loading="lazy" on the hero in your preview source, reload and repeat. Keep the file, placement and network conditions fixed. Compare when the request starts and when the hero paints. If the hero is the LCP element, leave it eager for delivery.
  4. Scroll toward the handle detail and check that it appears by the time you reach it. If it was already requested at the top, check how close it sits to the initial viewport and whether the page already preloads it. Repeat on the tallest supported viewport before assuming it can wait.

Keep the waterfall and the observed LCP element with your comparison. If the hero request starts early but the paint is still late, look at download time and rendering delay before changing priorities again. If the image appears early but shifts the text, reserve its space before it loads.

Image tools
All guides
Which campaign images should load lazily? | Formatry Media — Formatry