ToolSnap

Image Optimizer

Drop images to compress and optimize. Adjust quality, change format, and download.

Loading WASM engine...


How Does Image Optimizer Work?

Image Optimizer combines two compression engines for the best results across all image formats:

  • pngquant (WASM) — For PNG output, the tool uses libimagequant compiled to WebAssembly. This is the same engine behind the popular pngquant command-line tool. It reduces PNG images from millions of colors to a 256-color palette, achieving 60–80% file size reduction while maintaining excellent visual quality.
  • Canvas API — For JPEG and WebP output, the tool uses the browser's built-in Canvas API with configurable quality settings. This provides reliable, fast compression for photographic images.

Unlike server-based compressors, everything runs locally. Your images are never uploaded — ideal for screenshots, client work, or any sensitive visual content.

Supported Formats

Image Optimizer accepts images in multiple formats:

  • PNG — Re-quantize existing PNGs for smaller file sizes using pngquant.
  • JPEG — Compress with adjustable quality or convert to other formats.
  • WebP — Compress or convert WebP images.
  • GIF — Convert GIF frames to optimized output (first frame).
  • BMP — Convert uncompressed bitmaps to compact optimized output.
  • AVIF — Convert AVIF images (browser support required).

Understanding the Controls

PNG Output (pngquant)

  • Quality Min/Max — Sets the acceptable quality range (0–100). The optimizer uses the fewest colors possible while staying within this range. Max 80 with min 0 works well for most images.
  • Max Colors — Limits the palette size (2–256). Fewer colors means smaller files but more visible banding.
  • Speed — Trade quality for processing speed (1–10). Speed 1 produces the best results but takes longer.

JPEG/WebP Output (Canvas API)

  • Quality — Controls lossy compression level (10–100%). 70–85% is recommended for web use. Higher values preserve more detail at larger file sizes.

When to Use Each Format

  • PNG — Screenshots, UI graphics, icons, logos, charts, and images with text or sharp edges. Best when you need transparency.
  • JPEG — Photographs and images with smooth gradients. No transparency support.
  • WebP — Modern format, typically 25–35% smaller than JPEG at equivalent quality. Supported by all modern browsers. Best choice for web images.
  • Keep Original — Optimizes each image in its original format. PNG/GIF/BMP use pngquant, JPEG/WebP use Canvas API.

Features

  • Smart presetsPhoto targets WebP at ~82% quality for photographs; UI / Screenshot keeps PNG with pngquant for sharp text, icons, and flat graphics
  • Before/after compare — Inspect each result with a draggable slider or side-by-side view, then open a zoom modal for pixel-level checks
  • Batch ZIP download — Process many files at once and download everything as optimized-images.zip
  • EXIF detection — Originals with camera or GPS metadata show a badge; optimized files never include EXIF, with a privacy banner when metadata was stripped
  • Export handoff — Send an image from another ToolSnap tool via the export menu and land here with the file already loaded

Frequently Asked Questions

Is my data uploaded to a server?

No. Everything runs locally in your browser using WebAssembly and the Canvas API. Your images never leave your device.

Can I upload multiple files at once?

Yes. Drag and drop or select multiple files — they all process with the current settings. Use "Re-optimize All" after changing settings, then download individual files or one ZIP archive.

Why is the compressed file sometimes larger?

This can happen when converting between formats (e.g., JPEG to PNG) or when the original image is already well-optimized. Try a different output format or lower quality settings.

Does this preserve image metadata (EXIF)?

No. Both compression methods strip EXIF metadata. When originals contain EXIF, the tool shows a badge and a privacy notice so you know location and camera details are not in the download. Use a dedicated tool if you need to preserve metadata.