Images and uploads
Compress an image to a file-size limit without changing its dimensions
Compare JPEG and WebP against the same byte budget, inspect the detail and understand when an upload limit cannot be met without resizing.
An upload form may accept a particular width and height but reject the file because it contains too many bytes. Reducing pixel dimensions is one option; changing the encoding is another. They solve different constraints.
The image compressor compares JPEG and WebP locally against the same target. It keeps the source dimensions fixed, reports measured output sizes and gives you synchronized previews so you can choose the result you prefer.
Open Image compressor →Start with the upload limit
Read the receiving service's limit and check its accepted formats. In this tool KB means 1,000 bytes and MB means 1,000,000 bytes. A service using KiB or MiB uses multiples of 1,024 instead. Leave a little headroom if the receiving service applies a different interpretation.
- Select a JPEG, PNG or WebP image and choose target-size comparison.
- Enter the maximum output size and unit, then compare JPEG and WebP.
- Check the actual bytes, unchanged dimensions and target status for both outputs.
- Use actual-pixel or enlarged previews with the same horizontal and vertical focus to inspect text, edges, gradients and fine detail.
- Download the preferred format only if the receiving service accepts it. The JSON size report can retain the measurements without the source image.
Compare the result instead of the quality percentage
A JPEG quality setting and a WebP quality setting are encoder inputs, not equivalent visual-quality scores. The tool searches a bounded set of settings independently for each format. It retains a measured candidate within the budget when found; it does not prove that candidate is the best possible encoding.
Inspect thin lines, small lettering, faces and smooth areas at actual pixels. A format that works well for a photograph may be less suitable for an interface screenshot. A larger result can also be a valid encoding: re-encoding an already efficient source does not guarantee savings.
Reference: MDN OffscreenCanvas convertToBlob format and quality behavior
Check transparency before choosing JPEG
JPEG cannot retain an alpha channel, so this tool composites its JPEG output onto white. WebP can retain transparency. The checkerboard preview makes transparent areas visible; inspect the result against the background on which you intend to use it.
If the target is not reached
The page reports the smallest output measured during its search if it could not meet the budget. It does not secretly shrink the image. Increase the budget, choose manual compression to resize deliberately, or use a format that better suits the content. Extremely small budgets may be incompatible with retaining both the dimensions and readable detail.
Comparison accepts sources up to 20 MiB, 16 megapixels and 8,192 pixels per side. Processing runs in a cancellable worker with a 30-second deadline. A browser without the required worker encoder reports that limitation; the manual mode remains available. Files and previews stay in your browser.
Reference: MDN OffscreenCanvas convertToBlob format and quality behavior
Technical references
These primary sources explain the underlying formats and browser APIs. Tool-specific behavior and limits above describe the current Buddy Code implementation.
PUT IT INTO PRACTICE
Try it with your own setup.
Resize an image manually or compare JPEG and WebP at the same dimensions against a target byte size.
Open Image compressor →