Image compression: meet a size budget without losing useful detail
An upload form or web page may need a smaller file, not necessarily a smaller picture. A useful compression decision keeps the important detail readable and measures the output that will actually be sent.
Quality is not a file-size percentage
A quality setting controls lossy encoding for formats such as JPEG and WebP. Choosing 80 does not mean the output will be 80% of the input size. Pictures with identical dimensions can produce different file sizes.
PNG does not use the same lossy quality trade-off. Judge the resulting picture, particularly small lettering and fine lines, instead of assuming the quality setting behaves identically across formats.
References: MDN — Canvas image export and lossy quality settings
Define an acceptable result before comparing
If the receiving service specifies a maximum size, check both the unit and the final file. In this tool, KiB means 1024 bytes; another service may use kB to mean 1000 bytes.
ToolRoof’s compressor keeps the image dimensions. A requested size is a bounded target, not a guarantee. You may need a separate resize if acceptable quality cannot reach the required size.
Inspect the picture, not just the counter
Compare lettering, edges, faces or product details with the original. A smaller file is not useful if an important number becomes unreadable, and a newly encoded file is not always smaller.
This workflow handles still images; it does not remove backgrounds or preserve animation. Keep the original separately and use it for another attempt rather than repeatedly compressing a copy that has already lost detail.
Worked example: a large saving that misses the limit
Suppose an 800 KiB image becomes 224 KiB. The saving is 576 KiB, or 72% of the original. If the required limit is 200 KiB, the result remains 24 KiB too large despite the substantial reduction.
These are illustrative figures, not a measured compression promise. If lowering quality further damages the image, a smaller set of pixel dimensions may be more useful than preserving the original dimensions at any cost. Check what the destination permits first.