How Image Compression Works in Your Browser
An image file's size in bytes is determined by three main factors: the total pixel count (width multiplied by height), the amount of colour information stored for each pixel, and how effectively the compression algorithm can predict and group adjacent pixels.
When you add files to the Image Compressor, the tool reduces the byte count of your JPEG, PNG, or WebP files directly inside your browser. The processing happens locally on your device; your files are never uploaded to BroBroGo.
By default, the tool preserves the original width and height of your images. It reduces the file size by changing how many bytes are spent describing the pixels, rather than changing the pixel dimensions themselves. However, compressing an image means giving up some level of detail. The amount of detail discarded depends on the compression strength you select.
If a file is already highly optimised before you add it, the tool will not hand back a larger file. Instead, it returns your original file untouched with the note: "This file is already as small as we can make it, so the original was kept."
Compression Strengths and Settings
The tool does not use numeric quality percentages. Instead, it offers four distinct compression strengths in a panel labelled "Not small enough, or not sharp enough?". This panel is closed by default and becomes available on the result screen after your first compression pass.
| Compression Strength | How It Works | Best Used For |
|---|---|---|
| Sharper | Stays closest to the original image data, saving the least amount of space. | High-resolution photos or images with fine text where detail is critical. |
| Recommended | The default setting. Balances visible clarity with a substantial reduction in file size. | General web use, email attachments, and online listings. |
| Smaller | Allows the largest reduction in bytes by accepting more visible changes. | Situations with strict upload limits where file size is more important than perfect detail. |
| Exact size | Compresses the image toward a specific file-size limit that you define. | Meeting strict form, application, or marketplace file-size ceilings. |
Target Size Mode
When you select "Exact size", a target size field appears. You can input a number and select a unit of either KB or MB. The interface accepts values from a minimum of 10 KB up to a maximum of 50 MB, opening with a pre-filled starting value of 100 KB.
To reach your target, the tool narrows in on the limit over repeated encoding attempts. If adjusting the compression settings alone cannot bring the file under your limit, the tool begins shrinking the image dimensions by approximately 10% per round. This dimensional shrinking stops when either of two conditions is met:
- The image is reduced to roughly one-third of its original pixel count (for example, a 4000 × 3000 image containing 12 million pixels will not shrink below approximately 4 million pixels, leaving each side at roughly 58% of its original length).
- The longest side of the image reaches 800 pixels.
If the tool successfully meets your limit, the output displays "Target: Reached". If it reaches one of the dimensional floors before meeting the limit, it displays "Target: Closest possible result". This status indicates that the encoder has been pushed to its limit and the image has been scaled down as far as allowed; you may need to raise your target size or accept a smaller image.
Format-Specific Compression Rules
Different image formats handle colour, transparency, and compression in distinct ways. Choosing the right format can often save more space than simply compressing the existing one.
PNG (Portable Network Graphics)
PNG compression in this tool is lossy, meaning it permanently discards colour information to achieve smaller file sizes. The tool cuts the number of distinct colours down to a palette of at most 255, and then losslessly repacks the remaining data.
To ensure quality, the tool tests several degrees of colour reduction against the original image. If the visible difference is too large, that candidate is discarded, and the smallest surviving version is selected:
- Sharper tests only the gentlest colour reduction and enforces a strict likeness check.
- Recommended tests a moderate range of colour reductions.
- Smaller tests the widest range and accepts more visible change.
If an image has too much fine detail to reduce colours safely (such as a photograph saved as a PNG), or if it is already indexed, the tool performs a lossless repack instead. This is reported as: "This picture has too much fine detail to shrink further without visible damage, so it was kept pixel-for-pixel identical."
JPEG and WebP
For JPEG and WebP outputs, the tool encodes the image at several settings, compares each candidate against the original, and keeps the smallest file that still matches the original closely.
- Transparency: JPEG does not support transparency. If you convert an image with transparent areas to JPEG, those areas will be filled with solid white.
- WebP Suggestions: If converting a JPEG or PNG to WebP would make the resulting file less than half the size of the original format, the tool displays the note: "This picture would be far smaller as WebP. Change the output format below to try it."
Metadata, Rotation, and Memory Safety
- Metadata Removal: Compressing an image rewrites the file entirely. Camera settings, capture dates, and GPS coordinates are not carried over to the compressed file. The only exception is when a file is returned untouched because it was already as small as possible; since this is your original file, its metadata remains intact.
- Image Rotation: The tool reads the rotation metadata embedded by cameras or phones and applies it during compression, ensuring your images do not output sideways.
- Memory Safety Limits: To prevent very large images from exhausting your browser's memory, the tool features a built-in ceiling of approximately 24 million pixels. If an uploaded image exceeds this limit, it is automatically scaled down, and the output displays the label "Auto-limited for memory safety".
Using the Interface
- Upload: Drag and drop up to 20 JPEG, PNG, or WebP files onto the area marked "Choose or drop images", or click the area to select them manually.
- Processing: Compression starts immediately. The progress bar displays the current file name and its position in the batch, such as "Compressing beach.jpg (3/6)...". You can click "Cancel" at any time to stop the batch.
- Review: Once complete, the screen displays "Compressed 6 image(s)." along with the "Total saved" percentage and the combined batch size before and after.
- Compare: Select any image from the list to load it into the comparison view. Drag the slider labelled "Drag to compare the original with the compressed image" to inspect the compressed version against the original. Look closely at flat areas, sharp edges, and text to check for compression artefacts.
- Adjust: If you need to change settings, open the "Not small enough, or not sharp enough?" panel, adjust your compression strength, output format, or maximum dimensions, and click "Compress again".
- Download: Download individual files, or click "Download all (.zip)" to save the entire batch. Compressed files are named with
-compressedappended to the original filename. Files left untouched keep their original names.
Frequently Asked Questions
Are my images uploaded?
No. The compressor runs in your browser and keeps image files on your device.
Which image formats will it support?
It supports JPEG, PNG and WebP input with JPEG, WebP and PNG output.
Will compression reduce image quality?
Smart compression tests lightweight quality candidates and keeps the smallest result that still looks clear.
Can I set an exact target file size?
Yes. Target-size mode searches for a matching quality level and gently reduces dimensions if needed.