Skip to content
Performance3 min read630 words

Image Optimisation Guide: Cut Page Weight Without Losing Quality

How to optimise images for the web — AVIF vs WebP vs JPEG, responsive sizing, LQIP placeholders, lazy loading, and the pipelines used by fast sites.

High quality photography being processed and compressed for web use
Photo: Alexander Andrews

Images are usually 50–70% of a webpage's total weight. That's the single biggest lever most sites have — and the one most sites completely ignore.

This is the practical guide to image optimisation for the modern web. Format choice, sizing, lazy loading, LQIP placeholders, and the pipeline decisions that keep hero images sharp under 200 KB.

1. Format choice — AVIF, WebP, or JPEG/PNG

FormatFile size vs JPEGBrowser supportWhen to use
AVIF30–50% smallerChrome, Safari 16+, Firefox 93+Primary format for photos
WebP20–30% smallerAll modern browsersUniversal fallback for photos
JPEGBaselineUniversalLast-resort fallback
PNGLarger than JPEGUniversalOnly for images needing transparency or exact pixel art
SVGTinyUniversalLogos, icons, illustrations
Ship AVIF first, WebP as fallback, JPEG/PNG as final fallback. `next/image` does this automatically.

2. Responsive sizing — one image, many sizes

A 2000px-wide hero image on a phone screen is a waste. Mobile browsers should download a 400–800px version instead. Modern HTML handles this via srcset:

HTML
<img
  src="hero-800.jpg"
  srcset="hero-400.jpg 400w, hero-800.jpg 800w, hero-1600.jpg 1600w"
  sizes="(max-width: 768px) 100vw, 800px"
  alt="Hero image"
/>

next/image and similar do this for you — you provide the source, they generate every size at build time or on demand.

Photographer tagging optimised images for the web
Photo: Wesley Tingey

3. Lazy loading — when to and when NOT to

Native loading="lazy" is supported in every modern browser. It's the right default for anything below the fold. But — never lazy-load the LCP image (usually the hero). That delays the metric Google measures.

See our dedicated lazy loading guide for the nuances.

4. Placeholders — LQIP and blurred previews

Before an image loads, a placeholder prevents layout shift and gives users something to look at. Two common patterns:

  • Solid colour placeholder — average colour of the image, shown until it loads.
  • LQIP (Low Quality Image Placeholder) — a tiny (10–30 KB) blurred version inlined as base64 or SVG, shown until the full image loads.

next/image supports placeholder="blur" with a blurDataURL — a 4–8 KB base64 blob inlined in the HTML. Zero visible layout shift, smooth transition.

5. Prioritising the LCP image

The hero image is usually your Largest Contentful Paint element. Give it every performance advantage:

  • `priority` in next/image — sets fetchpriority="high" and disables lazy loading.
  • Preload<link rel="preload" as="image" href="..."> in the <head>.
  • Serve smallest sufficient size — a 1200px LCP image is usually plenty; avoid 2500px.
  • Avoid post-load transforms — don't apply CSS filters or blur to the LCP image.

6. Alt text — SEO + accessibility win

Every content image needs meaningful alt text. Not image1.jpg, not photo, but a real description of what the image shows and its purpose in context. Decorative images should have alt="" (empty) so screen readers skip them.

Good alt text is: descriptive (2–15 words), specific to the image content, natural language, and includes relevant keywords only if they genuinely describe the image. See our image SEO guide for depth.

7. The complete pipeline

  1. Author the image at 2× your largest display size (Retina).
  2. Compress at source to remove metadata and reduce lossless bloat.
  3. Serve through an image pipeline (next/image, Cloudflare Images, imgix) that outputs modern formats + responsive sizes.
  4. Lazy-load below the fold. Priority-load the LCP element.
  5. Add meaningful alt text + descriptive filename.
  6. Verify in Lighthouse that no image is triggering LCP warnings.

The bottom line

Image optimisation is the single highest-ROI performance work on most sites. Modern format + responsive sizes + lazy loading + a smart LCP strategy = half the page weight for the same visual quality. It's the biggest win most sites are still leaving on the table.

Frequently asked questions

Short answers to the questions readers ask most often about this topic.

AVIF or WebP — which should I use?
Both, with a fallback. AVIF is 20–50% smaller than WebP but rendered slightly slower. Ship AVIF first, WebP as fallback, JPEG/PNG as last resort. next/image handles this automatically.
How large should hero images be?
For a full-width 1920px hero, ship an optimised AVIF around 100–200KB. Anything over 400KB for a single hero is a red flag.
Do I still need to compress images manually?
Not if you're using next/image, Cloudflare Images, or Netlify Image CDN — they handle format negotiation and compression at the edge.

In summary

How to optimise images for the web — AVIF vs WebP vs JPEG, responsive sizing, LQIP placeholders, lazy loading, and the pipelines used by fast sites. If you want a partner to build, ship, and grow a site that lives up to this playbook, get in touch with Befazed.

Web Design & Development

Befazed Studio

Befazed is a premium web design and development studio building modern, high-performance websites, landing pages, and digital experiences for founders and growing brands.

View portfolio →

Last updated .

Keep reading