A landing page with twenty high-resolution images above the fold loads in 8 seconds on a 4G connection. Users leave after 3. The fix is not fewer images — it is smarter loading.
Three layers
-
Inline placeholder — a 20-byte SVG with the dominant colour, embedded as a data URI in the
srcattribute. Zero network cost. -
Low-quality image — a 1KB blurred JPEG loaded via
srcsetat a tiny width. Appears in ~200ms. -
Full image — the real file, loaded with
loading="lazy"andfetchpriorityset by viewport position.
<img
src="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='300'%3E%3Crect fill='%23b8860b' width='400' height='300'/%3E%3C/svg%3E"
srcset="thumb-20w.jpg 20w, full-800w.jpg 800w"
sizes="(max-width: 600px) 100vw, 50vw"
loading="lazy"
alt="Casino interior"
width="800" height="600"
>
LCP optimisation
The Largest Contentful Paint image should NOT be lazy-loaded. Add fetchpriority="high" and preload it:
<link rel="preload" as="image" href="hero-800w.jpg" fetchpriority="high">
A media-rich site like play at casino pride that relies on visual impact for first impressions needs sub-2-second LCP — the placeholder-to-full swap should be imperceptible.
Format selection
Serve AVIF where supported (40% smaller than WebP), WebP as fallback, JPEG as final fallback. Use the <picture> element:
<picture>
<source srcset="hero.avif" type="image/avif">
<source srcset="hero.webp" type="image/webp">
<img src="hero.jpg" alt="...">
</picture>
Takeaway
Progressive loading is three separate problems: placeholder (instant), low-quality (fast), full (lazy). Solve each layer independently.
Top comments (0)