What this is about
On most web pages, the pictures weigh more than everything else together. A big picture on a slow phone can make a page feel broken. There are two cheap ways to fix this. Pick a smaller file format, and send each screen only the size it needs. This article shows what that did for the Romanian blog on doar.bio, with the real numbers, and how to try it on your own pictures.
Why it matters
Page weight costs your visitors time and data, and it costs you visitors who leave before the page loads. It is also a case where a small effort gives a large result. You do not need a faster server. You need smaller files.
How it works
Formats are different ways to pack the same picture
- PNG keeps every pixel exactly. It is great for logos and screenshots, and heavy for photos and generated pictures.
- JPEG and WebP throw away detail your eyes will not miss, and the files shrink a lot.
- AVIF is newer and usually packs the same picture into fewer bytes than WebP, at the same look.
"Quality" in these formats is a dial. Higher means bigger files and fewer artifacts. You pick a setting, look at the result, and keep the lowest one that still looks right.
Sizes matter too
A phone that is 390 pixels wide does not need a picture that is 1344 pixels wide. If you send the big one, the phone downloads pixels it cannot show. The fix is to make several widths of each picture, and let the page pick one by the width of the screen. The page can also list formats in order of preference, and the browser takes the first one it understands.
What we did on doar.bio
The Romanian blog on doar.bio has generated pictures for its articles. There were 84 of them. They were PNG files at 1344 by 768 pixels, 126.0 MB in total, around 1.5 MB each.
Each picture needed two marks. One is a translucent cream band across the top with the logo on it. The other is a small dark label in the bottom right that says, in Romanian, that the image was made with artificial intelligence.
A script adds both marks and saves each picture in six files: AVIF at quality 52 and WebP at quality 80, each at three widths, 480, 960 and 1344 pixels. The script skips a picture that it already processed, by checking a fingerprint of the source, the logo and the settings. So running it twice does nothing the second time. It also has a check mode that confirms the files match the settings.
The numbers
| Format and width | Average per picture |
|---|---|
| Original PNG, 1344 px | 1,500 KB |
| Old WebP, 1200 px | 99 KB |
| New WebP, 960 px | 68 KB |
| New AVIF, 960 px | 36 KB |
| New AVIF, 480 px | 14 KB |
On a desktop, a browser like Chromium now loads the 960 px AVIF where it used to load the old WebP. That is a drop of 64 percent. A phone that is 390 pixels wide loads the 480 px AVIF at 14 KB, which is 86 percent less than the old 99 KB file.
We also report the less flattering number. At the full 1344 px width, the 84 AVIF files add up to 4.8 MB, which is roughly 57 KB each. So the 36 KB figure belongs to the 960 px size. The whole set of six files per picture adds up to 25.9 MB, but a page never loads all six. It loads one per picture.
What this does not prove
Several things are still open, and we say them plainly.
- We only measured in Chromium. Other browsers may choose a different format.
- A file size is not a loaded page. The 14 KB figure leaves out the HTML and other files on the page.
- We do not know if readers notice or mind the label on each picture.
- We do not know if the band across the top hides detail that matters in some picture.
Doing it on your own pictures
- Take three pictures from your own site.
- Convert each to AVIF and WebP with a tool such as ImageMagick or squoosh.app, at several quality settings.
- Compare the files side by side at the size they will be shown, not zoomed in.
- Keep the lowest quality that looks right to you.
- Make a 480 px and a 960 px copy for small screens.
- In your page, list AVIF first, WebP next, and the old file last.
Words you may not know
- PNG: a picture format that keeps every pixel exactly.
- WebP: a format that packs photos smaller by dropping detail you will not miss.
- AVIF: a newer format that usually packs even smaller.
- Pixel: one dot of a picture.
- Quality: a setting that trades file size against fidelity.
- Fingerprint: a short code from a file's content, used to tell if it changed.
- Responsive image: a picture offered in several sizes so each screen picks one.
Try it
- Open doar.bio on your phone, then on a computer. Open the Network tab on the computer, filter by Img and read the sizes.
- Look at the full account of the numbers above in our post 84 article pictures went from 126 MB of PNG to about 36 KB each.
- See the sites we run at amarbaro.com/web.
Read next
- 84 article pictures went from 126 MB of PNG to about 36 KB each: the full record, with the table and the checks.

Commenti
Ancora nessun commento.
Accedi per commentare.