Marcus Andrey Study
Ler em português Library

Framework · Imagery · 3 min read

Image format chooser

Which file format each kind of image gets (JPEG, PNG, WebP, AVIF or SVG), and how to set a quality bar by looking at your own photos instead of trusting rules of thumb.

JPEGPhotos

Lossy, supported everywhere. Still a fine default and the fallback.

The safe fallback
WebPPhotos, transparency

Lossy or lossless. Usually smaller than JPEG at the same look.

Widely supported since 2023
AVIFPhotos

Often the smallest; slower to encode, results vary by photo.

Widely supported since July 2026
PNGSharp edges

Lossless. Screenshots, flat graphics, transparency. Too heavy for photos.

Not for photos
SVGShapes

Not pixels. Icons, logos and line art, sharp at every size.

Tiny and crisp

Quality = lower it until you see a difference at real size, then one step back up

Pick by what the image is, then test the quality on your own photos (support dates as of November 2026).

Use it when

  • A designer exports photos as PNG "for quality" and pages get heavy.
  • The team sets up an image pipeline or an image service and needs defaults.
  • Someone says "AVIF is always smaller" and wants to switch everything.

How to use it

  1. Sort the image by kind. Is it a photo, a screenshot or flat graphic, or an icon, logo or line drawing? Output: one kind per image.
  2. Pick the format family. Photos: JPEG, WebP or AVIF. Screenshots, flat graphics, sharp edges or transparency: PNG (or lossless WebP). Icons, logos and line art: SVG. Output: a format for each kind.
  3. Offer modern formats with a fallback. Serve AVIF or WebP first and JPEG as the fallback, with <source type> in <picture> or an image service that does it for you. As of November 2026, WebP has been widely supported since 2023 and AVIF since July 2026. Output: the order of formats the page offers.
  4. Find the quality by looking. Lower the quality until you see a difference at the size people will see the image, then go one step back up. Check busy detail (leaves, hair) and smooth areas (skies, skin). Output: a quality value per format.
  5. Compare on your own photos. Run three typical product photos through a side-by-side tool and note the file sizes. Keep the format that looks right and weighs least. Output: the tested defaults, with the photos you tested them on.
  6. Write it down and automate it. Put format, quality range and the test photos in the image style guide, and make every format from one full-quality master. Output: one line in the guide, and no hand-exported copies.

Worked example

The bakery ordering app ships product photos as PNG at about 1 MB each. The team sorts its images: product photos (photo), the order-tracking screenshot in the help centre (screenshot), the bread-type icons (line art). They test three product photos in Squoosh: at the size of a product card, nobody sees a difference until WebP quality goes below about 70, and AVIF comes out a little smaller again on two of the three photos. Their guide now says: photos AVIF first, WebP next, JPEG fallback, quality 70 to 75, tested on the loaf, the croissant and the cake photos; screenshots PNG; icons SVG. Masters stay at full quality in the library.

Watch out for

  • PNG for photos. Lossless sounds better, but for a photo it's a much bigger file that looks the same.
  • Quality 100 by default. A far bigger file for a difference nobody can see at real size.
  • Judging zoomed in. Compression always shows at 400% on a big monitor. Judge at the size people see.
  • Trusting one benchmark. "X% smaller" is an average. On your photos it may be much less, or nothing.

Template

Copy into the image style guide.

Photos:        AVIF first, WebP next, JPEG fallback. Quality: ... to ...
Screenshots:   PNG (or lossless WebP)
Flat graphics: PNG, or SVG if they are shapes
Icons, logos,
line art:      SVG
Tested on:     ..., ..., ...  (three typical product photos), at ... px wide
Tool:          ...
Masters:       full size, full quality, in ...; formats made automatically by ...
Reviewed:      ... (date)
Source
Format comparison: MDN, Image file type and format guide. Browser support dates: webstatus.dev (WebP, AVIF), as of November 2026. Side-by-side compression: Squoosh
Where to find it
Photography and Imagery in UX: Formats and compression › What each format is for

"See on Amazon" links are affiliate links. As an Amazon Associate I earn from qualifying purchases, at no extra cost to you.

Saved only on this device.

↑ ↓ to move · Enter to open · Esc to close