Practical image workflow

How to Compress Images to a Target File Size

Set a byte budget, preserve the right format, and verify the actual result instead of assuming a slider guarantees an upload limit.

Translate the upload limit into bytes

Start with the receiving service’s instructions. A pixel limit and a file-size limit are separate requirements. In FileOnTap, decimal KB means 1,000 bytes and KiB means 1,024 bytes. For example, 100KB is 100,000 bytes while 100KiB is 102,400 bytes. If a service does not define its units, choose a conservative target below the stated maximum and verify the saved file. Renaming the extension does not change the encoding or byte count.

Choose a format before optimizing

Keep JPG for an ordinary photo when transparency is unnecessary. PNG preserves transparent pixels and sharp graphics, but complex photos may need much more space. WebP can be useful when the receiving service explicitly accepts it. The compressor preserves the input format; use the image converter first if changing format is allowed. A smaller file is not automatically an acceptable file: an application may reject WebP even when its byte count is below the limit.

Run a measured compression pass

Select up to 10 JPG, PNG or WebP files and enter the target. Quality limits the starting JPG/WebP quality; the search can lower quality and dimensions to approach the budget. PNG has no lossy quality slider effect, so its search can reduce pixels. Review each row’s actual bytes and target status. If the original already fits, it is retained. If re-encoding would enlarge it, the original is also retained and may still miss a very small target. There is no promise of lossless target-size compression.

Check detail, dimensions and the saved file

Open the downloaded result at actual size. Check faces, small text, edges and transparent regions. Dimension reductions may violate a minimum-width rule even when bytes fit. Compare the saved byte count with the receiver’s rule, then submit to the intended service yourself. FileOnTap does not test or certify that service’s acceptance. Keep your original separately; browser export does not guarantee original metadata, DPI, color profiles or HDR.

When to resize first

If the form names exact dimensions, resize first with crop or pad rather than allowing a compression search to choose them. Then compress and check that the dimensions still meet the requirements. If compression changes them, use a different format when allowed, prepare a simpler source, or accept that the requirements cannot be satisfied by that image. Download successes individually or as a ZIP under the 100MiB output cap; a ZIP does not change each image’s size.

Further reading

Browser image export and file-size units: MDN canvas toBlob and NIST SI prefixes. These describe APIs and units, not a guarantee of any upload service accepting your file.

Try a photo, screenshot and transparent PNG

These are recorded examples, not promised results for your files. Download an input, use the settings below, then compare your saved output.

All runs used quality 82 and decimal KB (1 KB = 1,000 bytes). The 0.001 KB case intentionally asks for only one byte: the tool returns its best effort and reports a miss. PNG quality does not act like lossy JPG quality; dimensions may shrink.

InputTargetDownloaded resultPixels: before → after
Landscape photo
299,063 B
50,000 B49,519 B
Target met
1280 × 575 px → 1280 × 575 px
Landscape photo
299,063 B
100,000 B98,937 B
Target met
1280 × 575 px → 1280 × 575 px
Landscape photo
299,063 B
200,000 B144,547 B
Target met
1280 × 575 px → 1280 × 575 px
Original fictional interface screenshot
44,015 B
50,000 B44,015 B
Target met
1200 × 800 px → 1200 × 800 px
Original transparent graphic
15,566 B
50,000 B15,566 B
Target met
512 × 384 px → 512 × 384 px
Original transparent graphic
15,566 B
1 B88 B
Target missed
512 × 384 px → 1 × 1 px

On a small screen, scroll the table sideways to compare output pixels.

Landscape photo before compression
Landscape photo · Before
299,063 B · 1280 × 575 px · Download input
Landscape photo after the 50 KB pass
After · 50 KB target
49,519 B · 1280 × 575 px · Download output
Original fictional interface screenshot before compression
Original fictional interface screenshot · Before
44,015 B · 1200 × 800 px · Download input
Original fictional interface screenshot after the 50 KB pass
After · 50 KB target
44,015 B · 1200 × 800 px · Download output

Already below target; original bytes retained unchanged.

Original transparent graphic before compression
Original transparent graphic · Before
15,566 B · 512 × 384 px · Download input
Original transparent graphic after the 50 KB pass
After · 50 KB target
15,566 B · 512 × 384 px · Download output

Already below target; original bytes retained unchanged.

See the actual target-miss interface
Compressor showing a one-byte PNG target miss and follow-up links
The returned PNG is not evidence that a one-byte image is possible. Check both bytes and pixel dimensions.
Source, environment and reproduction details

Recorded 2026-10-19 · Chromium 140.0.7339.16 · Windows · 1280 × 960 · site version 865d4e4.

Photo: Fronalpstock big.jpg — Hannes Röst, CC BY-SA 3.0. Resized and re-encoded; all photographic derivatives in this sample keep that license. Original fictional screenshots, transparent graphics and PDFs are available under CC0. No source includes customer files.

  1. Download an input linked above and keep the original.
  2. Use this tool with the listed settings. Keep the tab open, then save the actual output.
  3. Compare saved bytes, dimensions and detail. Browser/encoder versions may produce different bytes; these are recorded observations, not universal compression ratios.

Download settings, exact byte counts and SHA-256 checksums (JSON) · Asset licenses

Tools and related guidescompress imagecompress image to 50kbcompress image to 100kbcompress image to 200kbresize imagewhy image compression misses target size