Why does fitting an AVIF under a size limit take several tries?

A file-size limit looks like one setting, but fitting an AVIF can take several complete tries. FluffyBench has to make each file before it knows whether it fits.

Why can't an AVIF quality setting promise a file size?

Think of an upload limit like an airline's luggage allowance: a bag that looks small still has to be weighed. An AVIF quality setting is a dial; you learn the file's size after it's made.

A Quality dial leads to a finished AVIF file, whose measured bytes are compared with a size ceiling on a scale.
Quality controls how much detail the encoder keeps. It isn't a file-size meter. Sources and measurement notes

How FluffyBench finds an AVIF that fits

FluffyBench starts at your chosen quality. If that AVIF fits, you're done; a size target doesn't always need several tries.

Flowchart: try the chosen quality and save immediately if it fits. Otherwise try minimum quality; an oversized minimum produces an error. A fitting minimum leads to up to 4 midway checks, then the highest fitting tried quality is saved.
Midway qualities narrow the gap between fitting and oversized attempts. FluffyBench reuses the opened picture and makes at most 6 files; it doesn't check every possible quality.

One AVIF size search, shown in six tries

In an earlier recorded search using a generated image, FluffyBench met a 6.0 KB ceiling with quality 52, producing a 5.6 KB file. It took 6 tries to get there.

Attempt 1: quality 92, 11,761 bytes, over the limit. Attempt 2: quality 1, 331 bytes, fits. Attempt 3: quality 47, 4,792 bytes, fits. Attempt 4: quality 69, 7,466 bytes, over the limit. Attempt 5: quality 58, 6,358 bytes, over the limit. Attempt 6: quality 52, 5,568 bytes, kept.
Read from top to bottom in attempt order. The dashed line marks the cap; the highlighted final row is the file FluffyBench kept.

Doing it in FluffyBench: set an AVIF size limit

Use FluffyBench's AVIF converter when you need an AVIF for a destination with a file-size cap. FluffyBench's Image Space Saver is an alternative when you're choosing a format or reducing dimensions to meet an upload rule.

For a still photo, here's the path from choosing your image to saving the AVIF. Set the cap your destination gives you before you convert.

  1. Choose images, To set to AVIF, and the Settings gear.
    Choose images, To set to AVIF, and the Settings gear.
    Step 1. Add your photo with Choose images, keep To on AVIF, and open Settings. Keep your original as you make this copy.
    1. Choose images adds your photo.
    2. Keep To on AVIF for this job.
    3. Open Settings with the gear.
  2. Quality 92, Size Original, and a checked file-size limit of 100 KB per file.
    Quality 92, Size Original, and a checked file-size limit of 100 KB per file.
    Step 2. Quality sets the starting point. The size limit lets FluffyBench lower quality to fit your cap. The 100 KB shown is an illustration: use your destination’s limit.
    1. Leave Quality at 92 for this example.
    2. Original keeps your photo’s pixel dimensions.
    3. Enable Limit each file’s size and enter your cap in KB per file.
  3. Settings gear to close the phone panel, followed by Convert.
    Settings gear to close the phone panel, followed by Convert.
    Step 3. Close Settings with the gear on a phone, then press Convert.
    1. Click the gear again to close Settings on a phone.
    2. Press Convert to start the size search.
  4. Completed AVIF photo preview, output size readout, and Download.
    Completed AVIF photo preview, output size readout, and Download.
    Step 4. Read the output size, then Download your copy. Open the saved AVIF to check fine detail and try it in the destination that needs it.
    1. The thumbnail identifies your converted photo.
    2. Read the finished AVIF’s dimensions and size.
    3. Download saves your AVIF copy.

If your destination writes its limit in KiB, FluffyBench's data-size converter helps you translate that limit into the KB field. If the destination won't open AVIF, a small enough file still won't work there; our image-format compatibility guide can help you choose a format it can open.

Need to set a file-size target for an image?

Ready to apply a size target to an AVIF?

What if FluffyBench can't reach your AVIF size limit?

FluffyBench reports an error when its minimum-quality attempt is still too large. In this earlier recorded request, both files it made exceeded the ceiling.

A 1,024-byte limit sits below the starting quality-92 file at 2,125 bytes and the minimum quality-1 file at 2,137 bytes. The search stops without checking midway qualities.
Smaller pixel dimensions or a different accepted format give you another way to meet the upload rule.
Search FluffyBench