TinyImageResizer.com

Set a maximum file size for AVIF images and balance encoding speed with dimensions

Compress images to AVIF with a custom KB or MB target, encoder speed control and optional dimension reduction. Download one file or a ZIP batch.

Select images

or drop images here

100% Private & Secure
Instant Processing
No Signup Needed
Free Forever
Companion ToolNeed exact physical width and height after compressing?
Resize Image

Compress AVIF images to a chosen KB or MB limit

The Compress AVIF to Size tool is for situations where an image needs to be delivered in the AVIF format while staying near a specific file-size ceiling. You can begin with a preset such as 10 KB, 20 KB, 50 KB, 100 KB, 200 KB, 500 KB, 1 MB or 2 MB, then enter a custom maximum when your upload form or website gives a different limit. The custom field accepts a range from 5 KB to 10,000 KB. The setting is a maximum target, not a request to create a file with an exact byte count.

AVIF is a modern image format based on the AV1 image coding technology. It can be useful for web photography and graphics when the destination supports it, but not every older application or upload portal accepts AVIF. This tool always produces an AVIF file. Its file picker is broader than the route name suggests: it allows AVIF as well as common browser-readable image inputs such as JPG, PNG and WebP. Those files are encoded into AVIF output during processing. Check the output format requirement of the receiving service before converting a source image.

The compression process runs through the TinyImageResizer server API using the Sharp image library. This is different from the browser-only Canvas tools on the site: the selected image file is sent to the server for encoding. Do not describe this workflow as entirely local or as a no-upload compressor. The server produces an AVIF result and the interface provides a download. If you select multiple files, the tool packages the converted outputs in a ZIP archive.

Choose a target and encoder speed

The target size control offers popular limits and a custom field. A lower target can require stronger compression, smaller pixel dimensions or both. A 10 KB target is extremely restrictive for many photographs, while a 500 KB or 1 MB ceiling gives a larger image more room to retain detail. A simple icon or flat graphic may reach a small target more easily than a detailed photograph with texture, noise and many colour transitions.

The Encoder Speed control ranges from 1 to 8. Lower settings are described in the interface as slower encoding for smaller files; higher settings prioritize faster encoding. The backend converts this setting into the AVIF encoder effort value. Choose a slower setting when file size is the main priority and you can wait longer. Choose a faster setting when you are processing a batch and speed matters more. Speed is an encoder trade-off, not a quality slider with a guaranteed result.

The Keep Exact Dimensions option controls whether the tool may reduce the image's pixel width and height. Leave it enabled when exact pixel dimensions are part of the specification. Turn it off when the target size is more important and proportional downscaling is acceptable. If dimensions are locked, the encoder may only be able to reduce quality so far; the resulting AVIF can remain above the requested maximum. If dimensions may change, the server can try smaller proportional sizes, but there is still no guarantee that every file will fit.

How to compress an image to AVIF

Open the Compress AVIF to Size page and select an AVIF image, or choose a supported JPG, PNG or WebP image that you want to convert into AVIF.
Select a preset such as 50 KB, 100 KB, 500 KB, 1 MB or 2 MB, or enter a custom maximum from 5 KB to 10,000 KB.
Set Encoder Speed. Choose a slower setting when you want the encoder to spend more effort on reducing file size.
Decide whether to enable Keep Exact Dimensions. Keep it on for fixed pixel requirements; turn it off only when proportional resizing is acceptable.
Start processing and allow the server to encode the file. For multiple images, wait for the ZIP archive to be prepared.
Download the AVIF result, inspect its actual byte size and open it in the software or website that will receive it.

How the AVIF size search works

The backend first encodes a low-quality AVIF candidate to test whether the requested target is achievable at the current dimensions. When that candidate is small enough, it uses a short quality search to find a higher quality value that remains within an internal safety buffer below the target. If the candidate is too large and dimension changes are permitted, the encoder can run further passes at smaller proportional dimensions. The goal is to find a usable balance between file size, visible detail and pixel resolution.

There are limits to that search. When Keep Exact Dimensions is on and the lowest tested quality still exceeds the target, the tool returns that smallest attempted result rather than making the dimensions smaller. When dimension reduction is enabled but the search cannot find a candidate within the ceiling, the fallback path may also return a file above the target. The response includes a target-hit indicator for a single result, so pay attention to the achieved-size status. The batch ZIP summary has less reliable aggregate status reporting, so check individual files from the archive rather than assuming every image met the limit.

Where a target-size AVIF is useful

Website images when the site's content system accepts AVIF and bandwidth is a concern.
Product or editorial photographs that need a known upper size limit.
Image collections where you want to convert common raster sources into one modern output format.
Large graphics that can be scaled down before upload without violating a required pixel size.
Delivery workflows where the receiving application supports AVIF and you can verify the final file. Avoid using AVIF just because it is newer. Some government forms, legacy desktop applications and older content systems accept only JPG or PNG. In those cases, convert to the required format instead of uploading an AVIF file that the destination may reject. Keep the original source as a separate file, especially when the image may need further editing.

Privacy, compatibility and final checks

Because AVIF compression is performed on the server, selected files are transferred to TinyImageResizer's processing endpoint. Do not use this page for confidential images unless the service's current privacy terms are acceptable for your use. The encoder requires a file format that the server's image library can decode. The input picker is broad, but a file being selectable does not mean every proprietary or unusual image type is guaranteed to work.

After downloading, check four things: the file opens, the extension and actual format are AVIF, the pixel dimensions still meet your needs, and the achieved file size is below the receiving limit. If the result misses the target, try a slower encoder speed, allow proportional downscaling when appropriate, or select a larger target. Use a different output format when the receiving system does not support AVIF.

Frequently Asked Questions

Set a maximum file size for AVIF images and balance encoding speed with dimensions

Does this tool compress images to AVIF?
Yes. The output format is AVIF. The tool can take AVIF files and common browser-readable image inputs such as JPG, PNG and WebP, then encode them as AVIF.
Can I set a custom AVIF file-size target?
Yes. You can choose a preset or enter a custom maximum from 5 KB to 10,000 KB.
Does the tool support MB targets?
Yes. Presets include 1 MB and 2 MB. The custom field is expressed in KB, so enter the equivalent KB value for another MB limit.
Can I keep the original pixel dimensions?
Yes. Enable Keep Exact Dimensions. If the image cannot reach the target at those dimensions, the result may remain above the requested limit.
What does Encoder Speed change?
It controls the AVIF encoder effort trade-off. Slower settings can spend more time attempting a smaller result; faster settings prioritize encoding speed.
Can I compress several images at once?
Yes. Select multiple images and the tool packages the AVIF outputs in a ZIP archive.
Are images processed only in my browser?
No. This tool sends the selected files to the server-side Sharp AVIF encoder for processing.
Will every image finish below the target?
No. The target is best-effort. Some detailed images cannot fit without more quality loss or smaller pixel dimensions.
Does AVIF work in every website or application?
No. AVIF support depends on the receiving browser, software or upload portal. Confirm that the destination accepts AVIF before using the output.
What should I check before uploading the AVIF?
Open the downloaded file, confirm it is AVIF, check its actual file size and pixel dimensions, and verify that the destination accepts the format.

Compress to a specific size

Choose a target size for forms, portals and uploads.

Compress any image

Related Tools

Explore more tools to optimize, convert, and manage your images.

All Tools