What Image Compressor Does
Reduces the byte size of PNG, JPEG, and WebP images directly in your browser using adjustable lossy quality controls, automatic target-KB fitting, or optional 8-bit indexed PNG palette quantization.
Step-by-Step Instructions
- Drop one or more PNG, JPEG, WebP, GIF, or AVIF files into the upload zone (or load a sample image).
- Choose whether to keep the original format or convert to WebP or JPEG for stronger compression.
- Drag the Quality slider or enter a Target Max Size in KB to auto-tune compression.
- Click Compress Image(s), inspect the before/after visual slider and byte savings, then download.
How It Works in Your Browser
Your browser decodes the source image via createImageBitmap onto an OffscreenCanvas (or standard Canvas), then re-encodes the pixel buffer in your chosen output format. For JPEG and WebP, the quality slider sets the encoder quantization level; when Target KB mode is enabled, RapidPNG runs a fast binary search across quality levels to stay under your byte budget. For PNG output, standard Canvas produces lossless 32-bit RGBA data, while Palette Quantization mode builds a compact 256-color indexed PNG using browser CompressionStream DEFLATE.
Quality Considerations & Common Mistakes
For photographs, JPEG or WebP quality settings between 75 and 85 usually preserve natural texture while trimming substantial weight. Avoid compressing an already low-quality JPEG multiple times, as repeated lossy passes amplify block artifacts.
- Exporting a camera photograph as 32-bit PNG and expecting it to shrink—switch output format to WebP or JPEG instead.
- Dropping quality below 30% instead of resizing oversized 4000px dimensions down to web display width.