Performance

What image format should I use on my website?

AVIF first, WebP as a fallback, JPEG or PNG last, delivered through a picture element. SVG for logos, icons and line art. Getting the size right for each viewport saves more than the format choice, so do both.

Answered by Anas Bin Masud 151 words 3 sections

The formats and where each belongs

FormatUse forNote
AVIFPhotographs30–50% smaller than WebP, slower to encode
WebPPhotographs, fallback25–35% smaller than JPEG, universally supported
JPEGFinal fallbackUniversally supported
PNGImages needing transparency without WebPLarge; usually avoidable
SVGLogos, icons, line artScales infinitely, tiny, no variants needed

The bigger saving

Sizing. Serving a 2000-pixel image to a 390-pixel phone wastes more than any format choice recovers. Generate several widths and let srcset and sizes pick.

The two attributes that must always be there

Width and height, or an aspect-ratio in CSS. Without them the page reflows as images arrive, which is measured directly as Cumulative Layout Shift.

The longer version

This answer is deliberately short. If you want the full treatment, Image SEO: findable images that do not wreck your page speed covers it in about 3 minutes — free, ungated, written from client work.

Who answered this

Anas Bin Masud builds e-commerce sites and does technical SEO for businesses in the UK, Canada and Pakistan — fifteen live client sites, six of them stores taking real payments. These answers come from those projects rather than from a content brief. More about how I work, or ask me something directly.

People also ask

All 110 answers →

Still have a question this did not answer?

Send the brief and you get a reply within one business day — either questions, or a scoping call. If your project is not something I should take on, I will say so then.

Response
Replies within 1 business day
Hours
Mon–Fri, 09:00–18:00 PKT — overlaps 05:00–14:00 UK, 00:00–09:00 US Eastern
Booking
Booking projects from October 2026
WhatsApp — opens a chat with +92 346 5348466 in a new tab