# Image formats and sizes for a fast website | Plyo

> Which format to use, how large to export, and why the image is almost always the reason a page feels slow.

Source: https://plyo.studio/blog/image-formats-for-a-fast-website

1.  [Home](/)
2.  [Blog](/blog)
3.  Image formats and sizes for a fast website

# Image formats and sizes for a fast website

Which format to use, how large to export, and why the image is almost always the reason a page feels slow.

Plyo Studio 12 August 2026 7 min read

On this page

[Pick the format by what the image is](#pick-the-format-by-what-the-image-is)[Export at the size it is actually shown](#export-at-the-size-it-is-actually-shown)[Serve different sizes to different screens](#serve-different-sizes-to-different-screens)[Always set width and height](#always-set-width-and-height)[Load the right things first](#load-the-right-things-first)[Do not ship what nobody sees](#do-not-ship-what-nobody-sees) [Common questions](#common-questions)

Related service

[Astro websites](/services/astro)

On most business websites, images are the majority of the page weight and the reason the largest element takes so long to paint. Getting them right is the single highest value performance job, and it is mostly decisions rather than code.

## Pick the format by what the image is

**Photographs: AVIF, with WebP behind it.** AVIF is typically 30 to 50 per cent smaller than WebP at the same quality. Browser support is now good, and the fallback costs nothing if your build handles it.

**Logos, icons and diagrams: SVG.** Vector, tiny, sharp at every size, and restyleable in CSS. Never export a logo as a PNG unless it has a photographic element in it.

**Anything needing transparency with soft edges: WebP or PNG.** AVIF handles transparency too, but PNG remains the safe fallback.

**Screenshots: WebP.** Text in screenshots survives WebP compression better than it survives aggressive JPEG.

JPEG and PNG still work everywhere. If your tooling cannot produce modern formats, well compressed JPEG at quality 75 to 82 is perfectly acceptable; it is the uncompressed 4 MB export that is the problem.

## Export at the size it is actually shown

The most common waste: a 4000 pixel wide photograph displayed in a 600 pixel box. The browser downloads all of it and throws most of it away.

Rule of thumb: export at twice the largest size the image is displayed at, to stay sharp on high density screens, and no larger. A card image shown at 400 pixels wide needs an 800 pixel file.

## Serve different sizes to different screens

A phone should not download the desktop hero. The `srcset` attribute lets the browser choose:

```
<img
  src="/hero-800.webp"
  srcset="/hero-480.webp 480w, /hero-800.webp 800w, /hero-1600.webp 1600w"
  sizes="(max-width: 700px) 100vw, 800px"
  width="1600" height="900" alt="..."
/>
```

Most frameworks generate this for you from a single source file. Astro, Next.js and Webflow all do it; the thing to check is that it is switched on.

## Always set width and height

Without them the browser does not know how much space to reserve, so the page jumps as each image loads. That jump is measured as Cumulative Layout Shift and it is the most irritating thing a page can do while someone is reading it. Set the attributes to the file’s real dimensions and let CSS handle the display size.

## Load the right things first

Your hero image should load eagerly and, ideally, be preloaded. Everything below the fold should be `loading="lazy"`. Getting this backwards, which happens when lazy loading is applied globally, delays the one image that affects your Largest Contentful Paint score.

## Do not ship what nobody sees

Decorative background images, carousels where only the first slide is ever seen, and galleries loaded in full on page load are all pure cost. If an image only appears after an interaction, load it after the interaction.

## Keep reading.

[All posts](/blog)

-   [
    
    Engineering Contact forms: stopping spam without losing enquiries 6 min read](/blog/contact-forms-stopping-spam)
-   [
    
    Engineering Headless CMS, explained without the jargon 6 min read](/blog/headless-cms-explained)
-   [
    
    Engineering Multi-language and multi-region websites 7 min read](/blog/multi-language-and-multi-region-websites)

Updated 12 August 2026

FAQ

## Common questions

[Ask a question](/contact)

### Is AVIF ready to use?

Yes, with a WebP or JPEG fallback. Every current browser supports it, and the file size difference is large enough to matter on image heavy pages.

### What quality setting should I use?

Around 75 to 82 for photographs in any modern format. Above that you are adding bytes nobody can see. Check the result on a large screen before committing to a lower number.

### Does image compression lose quality?

Slightly, by design. The question is whether anyone can tell at the size you display it. For photographs on a website, generally not.

### Should I use a CDN for images?

If your host does not already optimise and serve images from the edge, yes. Cloudflare, among others, can convert and resize on request, which removes the export step entirely.

### How many images is too many on one page?

There is no fixed number. Watch total page weight instead: under 1 MB is good, over 3 MB is slow for anyone on a phone away from wifi.

About Plyo Studio

## Custom Astro websites. Built on Cloudflare.

Plyo Studio is an independent web studio that designs and builds fast, search-ready websites, web apps and interactive maps. Sites are custom-built in Astro and hosted on Cloudflare, so they load quickly and are easy for search engines and AI answer engines to read.

Founded by Chloe Nixon, a full stack developer and UI/UX designer from Australia, and Micky, a software engineer from New Zealand. Clients work directly with the founders from the first call to launch. Typical work: custom websites, migrations off Webflow, WordPress, Wix and Squarespace, web apps, and interactive maps and GIS. Projects are quoted at a fixed price before work starts.

[Start a project](/contact) [hello@plyo.studio](mailto:hello@plyo.studio) [About us](/about)

## Related pages

-   [Blog Read practical notes on designing, building and moving websites.](/blog)
-   [Astro websites Custom sites pre-built into lean HTML, for speed and search.](/services/astro)

Start a conversation

## Ready for a website that works harder?

[Start a project](/contact) [Free website audit](/audit)
