CompressPictureCompress an image

Image optimizer for websites

Every width a page needs, in AVIF, WebP and a JPEG fallback — with the byte table and a <picture> snippet that matches the files.

Free · No sign-up · Photos stay on your device

or drop up to 12 images hereGet every size your website needs in AVIF, WebP and JPG, plus a ready-to-paste snippet.

No photo handy?

One picture, the files a page actually needs

A web page should not send a 4,000-pixel photograph to a phone. The answer is a handful of files at fixed widths in modern formats, and markup that lets the browser pick. This page makes the files, names them {name}-{width}.{ext}, and writes the markup with the widths, heights and attributes already filled in.

It does not know your layout.

The sizes attribute is a guess until you edit it to the width your page draws the picture at. Hero images above the fold should drop loading="lazy".

Questions people arrive with

Why several widths and formats?
A phone downloads a 480-pixel file and a desktop a 1440-pixel one; a browser that reads AVIF takes the AVIF and one that does not falls back to WebP or JPEG. The <picture> element lets the browser choose, so nobody downloads more than their screen needs.
What goes in sizes?
How wide the picture is drawn on your page, in CSS terms. "(max-width: 960px) 100vw, 960px" means full width on narrow screens and 960 pixels wide otherwise. The browser uses it with the srcset widths to pick a file; edit it to match your layout before you copy the snippet.
Why is a width missing?
Because it is wider than the picture. Making it would only enlarge the picture, which costs bytes and adds no detail, so it is left out and the table says why.
What quality should I use?
The defaults — AVIF 55, WebP 75, JPEG 78 — are a common starting point for photographs. Each format's scale is its own, so the numbers are not comparable across formats. Look at the files at full size and move them if you see artefacts.

Elsewhere on this site

Optimize For Web
Photographic visual for Optimize For Web