Why Is My AVIF File So Big? Five Reasons and How to Fix Them

AVIF has a reputation for being the smallest format on the web. Then you export one and it is larger than the JPG it replaced. There are five usual reasons, and only one of them means you did something wrong.

Last updated: 2026-11-01 · Tested with Chrome 156 and ImageMagick 7.1.2-35 on macOS 26.6.2

The short answer

AVIF wins on detailed photographs. It loses, sometimes badly, on small images, flat graphics, screenshots, and anything with heavy film grain or noise. If your file is large, the first question is not "what did I do wrong" but "what kind of image is this".

Before changing any settings, check two things: the pixel dimensions, and whether the file is really an AVIF. A 6000 × 4000 photo saved at high quality is supposed to be a few megabytes — that is not a bug, it is a large image.

What this looks like in practice

A measurement from our own test machine — Chrome 156 on macOS 26.6.2, Apple silicon — using a 480 × 320 AVIF of a gradient with text:

FileSizeNote
Original AVIF145,560 bytesEncoded at quality 0.92
JPG at 92%16,858 bytesImageMagick 7.1.2-35
JPG at 85%7,097 bytesImageMagick 7.1.2-35

The AVIF was eight times larger than the JPG it became. Nothing was wrong with the file: flat gradients and sharp text are exactly the content AVIF handles least well, and the encoder was asked for near-maximum quality. A detailed photograph shows the opposite result — which is why "AVIF is smaller" is only true for some images.

First, confirm what you actually have

magick identify -verbose input.avif | head -40

That prints the format, dimensions, colour depth, file size and any embedded profiles. If ImageMagick is not installed, the browser converter shows dimensions and file size for each file you drop in, which is enough for a quick check.

Two red flags to look for: a file that claims to be AVIF but reports a different format, and a file with an ICC profile or EXIF block measured in hundreds of kilobytes. Both change the answer.

1. The image is hard to compress

Compression works by finding repetition. A landscape with a smooth sky and a repeating texture compresses beautifully. A night photo at ISO 6400, a film-grain effect, or a detailed fabric pattern is mostly noise — and noise is the one thing no lossy codec can throw away without visible damage.

What to do: almost nothing. This is the correct behaviour. If the file must be smaller, reduce dimensions or quality, and accept the loss. Denoising before encoding helps more than any encoder flag, but it also removes the grain you may have wanted.

2. The quality setting is higher than you think

AVIF encoders use a quality scale where the top of the range is not "good", it is "nearly lossless". Exporting at 90–100 can produce a file several times larger than the same image at 60–70, with no visible improvement at normal viewing size.

With libavif's command-line encoder, quality and speed are separate dials:

avifenc -q 60 -s 6 input.png output.avif

-q is quality, -s is encoder speed on a 0–10 scale (higher is faster and slightly larger). A slow preset at the same quality produces a smaller file; a fast preset produces a bigger one. If your export tool exposes "speed" or "effort", that setting is part of the size story.

What to do: try quality 60 and compare side by side at 100% zoom. Most photos survive it; text and fine line art do not.

3. Metadata and embedded previews

A phone photo can carry EXIF, GPS, an ICC profile, XMP, and sometimes a full-size JPEG preview inside the container. On a 400 KB image, 150 KB of metadata is not a rounding error.

What to do: strip what you do not need before publishing.

avifenc -q 60 --ignore-exif --ignore-xmp --ignore-icc input.png output.avif

Keep the ICC profile if colour accuracy matters — removing it can shift colours more than the size saving is worth. Strip GPS and camera data as a default; keep colour.

4. The image is too small to benefit

Every format carries fixed overhead: headers, box structure, colour information. For a 32 × 32 favicon or a 200 px thumbnail, that overhead can exceed the compressed pixel data. This is why a tiny PNG is often smaller than the same tiny AVIF — and why icon sets still ship as SVG or PNG.

What to do: below roughly 300 px on the long edge, compare formats instead of assuming. For icons and logos, SVG beats everything; for small UI assets, PNG is frequently the smaller file.

5. You are comparing against the wrong baseline

Three comparisons that mislead:

What to do: compare at matched visual quality. Export both, look at them side by side at 100%, and only then compare bytes.

When the file is big because it should be

ScenarioExpectedAction
6000 × 4000 camera photo, quality 90Several MBNothing — resize for the destination instead
Web hero image displayed at 1600 px wideA few hundred KBResize to 1600 px, then encode
32 × 32 iconUnder 2 KB in any formatUse SVG; AVIF overhead dominates
Screenshot of a documentLarger than JPG at high qualityUse PNG, or JPG at 85%
Grainy night photoLarger than a clean photoAccept, or denoise first

The one rule that saves the most bytes

Resize before you encode. Serving a 4000 px image in a 800 px slot wastes bandwidth in every format, and no codec setting compensates for it. Decide the display size, export at 1× and 2× that width, and let the browser pick. This single step usually saves more than switching formats.

Frequently asked questions

Is AVIF always smaller than JPG?No. It is usually smaller for detailed photographs at matched quality, and often larger for screenshots, icons, flat graphics and tiny images.
Why is my AVIF bigger after converting from JPG?Because the JPG was already compressed. You are re-encoding artifacts, and the encoder has to spend bits preserving them.
Does a higher AVIF quality setting always look better?Not visibly. Above roughly 70–75, most photographs show no difference at normal viewing size, while the file keeps growing.
Can I losslessly re-compress an AVIF to make it smaller?Not meaningfully. Re-encoding is either lossy again or produces a larger file. Start from the original source if you need a smaller output.
Should I strip the ICC profile to save space?Only if colour accuracy does not matter. On wide-gamut images, removing the profile can shift colours noticeably.

Related guides