Course contentsShow
← Web Development
Lesson 1252 of 2,98222. Responsive Images and MediaFree lesson

Lazy Loading and Above-the-Fold Images

Why critical images should use loading='eager' or omit the attribute entirely.

Lazy Loading and Above-the-Fold Images

You'll learn why critical images that appear immediately on screen should never use lazy loading.

The Above-the-Fold Problem

Imagine opening a newspaper: the stories "above the fold" (visible without unfolding) are what grab your attention first. On the web, "above-the-fold" means content visible without scrolling when a page loads.

When you add loading='lazy' to images in this critical viewport area, you create an unintended problem: the browser delays loading these images until it confirms they're near the viewport. This adds unnecessary delay to images users see immediately, creating a poor experience—blank spaces where images should be, or a flash as they pop in late.

When to Skip Lazy Loading

Critical above-the-fold images should use loading='eager' or omit the loading attribute entirely (which defaults to eager behavior). These include:

  • Hero images at the top of the page
  • Logos in the header
  • Any image visible on initial page load
  • Product images on e-commerce pages (often above-the-fold)
<!-- Critical hero image - DON'T lazy load -->
<img src="hero.jpg" alt="Welcome banner">

<!-- Or explicitly set eager -->
<img src="logo.png" alt="Company logo" loading="eager">

<!-- Below-the-fold image - DO lazy load -->
<img src="footer-image.jpg" alt="Footer graphic" loading="lazy">

The rule is simple: if users will see it without scrolling, don't make them wait.

Key Takeaway: Reserve loading='lazy' for below-the-fold images only; critical visible images should load immediately using loading='eager' or no attribute at all.