What the Image Compressor does
The Image Compressor takes one JPG, PNG or WebP file and re-encodes it as a WebP image at the quality you set. WebP is Google's image format with lossy and lossless modes; in lossy mode a lower quality number removes more detail in exchange for a smaller file. The slider runs from 35 to 95 and starts at 78.
The output keeps the exact pixel width and height of the source. Only the encoding changes, so a 1600 by 1200 photo stays 1600 by 1200. After the run, the result card shows the size before and after so you can judge whether the saving is worth any visible change, and its Download button saves the file. The file is named after the original with -compressed.webp on the end.
It suits photographs, screenshots and product shots destined for a website, a marketplace listing or an email with a file-size limit. It is the wrong tool when the destination insists on JPG or PNG, because the result is always WebP; the WebP to JPG and WebP to PNG converters on this site cover that step.
How to use it
Choose an image
Click the file area and pick a JPG, PNG or WebP from your device. One file at a time; the picker offers those three types only.
Set the quality
Drag the slider between 35 and 95. Start at the default of 78 for photographs and lower it while the result still looks acceptable; keep it high for screenshots with small text.
Compress and download
Press Compress. The browser encodes the WebP and shows it in a result card with the old and new file sizes; press Download on the card to save it with -compressed.webp added to the name.
What the quality slider actually changes
The slider value is handed to the browser's canvas encoder as a number between 0 and 1, so 78 becomes 0.78. Lossy WebP, like JPEG, discards fine detail the eye is least likely to notice, and lower values discard more. On photographs the change is usually invisible in the upper half of the range and shows up first around sharp edges, text and smooth gradients.
A lower value does not shrink every image by the same amount. A simple graphic with few colors is already compact, so dropping from 78 to 50 may save very little, while a detailed photo can lose a large share of its size with the same move. Compare the two sizes shown after each run rather than assuming.
Transparency, metadata and the output name
Before drawing your image, the tool paints the whole canvas white. Any transparent area in a PNG or WebP therefore comes out white in the compressed file. If you need transparency kept, use the PNG to WebP converter instead, which leaves the canvas clear and lets WebP store the alpha channel.
The browser re-encodes pixels only. Camera metadata such as the EXIF date, GPS position and camera model is not copied into the new file, which is often what you want before posting a photo publicly. Embedded color profiles are not carried over either; the image is drawn as your browser displays it.
The download keeps the original base name and adds -compressed.webp, so holiday.jpg becomes holiday-compressed.webp. The original file is untouched, which makes it easy to compare the two side by side before you replace anything.
When the compressed file is not smaller
A WebP that is already well compressed, or a tiny icon, can come out larger than the source. The new encode starts from decoded pixels, cannot reuse the original's compression decisions and adds its own container overhead. The size readout tells you straight away; keep the original in that case.
Very large images can exhaust the memory a browser allows a single page. The tool then reports that the image could not be compressed instead of producing a damaged file. Resize first with the Image Resizer, or export a smaller copy from your camera or editor, then compress that.
- Good candidates: photographs, screenshots, scanned pages saved as JPG or PNG
- Poor candidates: small icons, images that must stay PNG or JPG, images whose transparency you need
- Check the before and after sizes in the message before replacing the original
Limits to know before you rely on it
- The output is always WebP; the tool cannot write a smaller JPG or PNG.
- Transparent areas are filled with white because the canvas is painted white before the image is drawn.
- One image at a time; there is no batch mode or zip download.
- If your browser cannot encode WebP, the canvas falls back to PNG data, so the downloaded .webp may not be a true WebP file.
- Very large images can run out of browser memory and fail with a short error message rather than a partial result.
- EXIF metadata and embedded color profiles are not preserved in the compressed copy.
Questions people ask about the Image Compressor
Why does the compressed image download as WebP and not as JPG or PNG?
The tool asks the browser's canvas to encode image/webp, because lossy WebP generally gives a smaller file than JPEG at a similar visual quality and, unlike JPEG, can also store transparency. If the destination only accepts JPG, convert the result with the WebP to JPG tool, which has its own quality slider.
What quality should I pick for a photo?
Start at the default of 78 and open the download at full size. If you cannot see a difference, try a lower value and compare the file sizes shown; stop when edges or skin tones start to look blocky. Screenshots with small text usually need the top of the range because lossy encoding smears thin lines first.
Does compressing change the width and height?
No. The canvas is created at the image's natural width and height, so the pixel dimensions are identical to the source. If the file is large because of its dimensions rather than its encoding, use the Image Resizer first and then compress the smaller image.
Will a transparent PNG stay transparent?
No. This tool fills the canvas with white before drawing, so transparent pixels become white in the WebP. The PNG to WebP converter keeps transparency because it does not fill the background.
Why is my compressed file bigger than the original?
The source was probably already compressed efficiently, for example an optimized WebP or a small icon. Re-encoding starts from decoded pixels and cannot reuse the original's compression, so the new file can be larger. Compare the two sizes on the result card and keep whichever is smaller.
Is the image uploaded to a server?
No. The file is opened with a temporary browser URL, drawn to an in-page canvas and encoded there with HTMLCanvasElement.toBlob. The download is also a temporary browser URL that is released shortly after the save starts, and the site stores nothing.
Sources and further reading
- MDN Web Docs, HTMLCanvasElement.toBlob(): the quality argument for lossy formats and the PNG fallback when a type is unsupported
- Google Developers, An image format for the Web (WebP): lossy and lossless modes and transparency support
- web.dev, Compress images: lossy versus lossless compression and how quality settings trade detail for size
- Can I use, WebP image format: which browser versions display WebP