Quiet Pages

Picking image formats in 2026

15 July 2026

Image formats used to be a long debate. These days my rule of thumb fits on one line: AVIF for photos, PNG for screenshots, SVG for anything drawn. A few details make it work well.

Photos

AVIF gives the smallest files at the same visual quality, and every current browser reads it. I still keep a WebP fallback inside a <picture> element for older devices; it costs nothing but disk space.

Screenshots

Text in screenshots turns blurry in lossy formats. A well-compressed PNG is often smaller than people expect, and it keeps letters sharp.

Icons and diagrams

SVG scales to any screen and is usually a few hundred bytes. It can also follow the page's colour scheme, which is handy for dark mode.

Three habits that matter more than the format

  • Always set width and height, so the page does not jump while images load.
  • Use loading="lazy" for images below the first screen.
  • Never serve a 3000-pixel image into a 600-pixel column. Resize first.

Most of the weight I have removed from pages came from that last point, not from switching formats.

← All notes