Lazy Loading

Categories:Development

Lazy loading defers downloading an image, video, or script until it is about to enter the viewport, so the initial page load carries less weight. Applied carelessly it makes performance worse, because deferring the largest image above the fold delays the very paint the metric measures.

Last reviewed

How to apply it

Everything below the fold gets loading="lazy". Everything above it does not, and the single largest above-the-fold image should be the opposite: loading="eager" with fetchpriority="high", so the browser fetches it first.

This is the mistake worth checking for on any site built quickly. A template that sets lazy loading on every image will delay the hero image, and the hero image is usually what Largest Contentful Paint is timing.

What to defer and what to prioritise
AssetTreatmentWhy
Largest above-fold imageloading eager, fetchpriority highIt is what LCP measures
Other above-fold imagesloading eagerThey compete with the LCP paint
Below-fold imagesloading lazyWeight removed from first load
Iframes and video embedsLazy, or load on interactionThird-party players are heavy
Chat widgetsLoad on interactionSeconds of main-thread work

Layout shift is the other half

A deferred image with no declared dimensions means the browser cannot reserve space for it, so content jumps when it arrives. Always pair lazy loading with width and height attributes, or an aspect-ratio rule, or you trade one failing metric for another.

  • Lazy below the fold, eager above it
  • One image marked fetchpriority="high", never several
  • Width and height on every image, deferred or not
  • Iframes and embeds lazy loaded, since third-party players are heavy

Videos and third-party embeds

A chat widget or video player loaded on first paint can cost seconds. Loading them on intersection, or on interaction, is usually the single biggest performance gain available on a marketing site that already looks well built.

Why it matters for B2B marketing teams

This is the single most common performance defect we find on otherwise well-built B2B sites, and it takes minutes to fix. A template that lazy loads every image will delay the hero, which is usually the exact element the score is timing.

Frequently asked questions

Should every image be lazy loaded?+

No. Images in the initial viewport should load eagerly, and the largest one should be prioritised. Lazy loading above-the-fold images is a common template default and one of the most frequent causes of a poor Largest Contentful Paint score.

Does lazy loading affect SEO?+

Only through performance and rendering. Native lazy loading is understood by search engines, so images still get indexed. Custom JavaScript implementations that never trigger for a crawler can hide images entirely, which does cost you.

Related terms

←Back to Glossary