Compress image
Shrink JPG, PNG, WebP and GIF files right in your browser — no upload, with quality and metadata under your control.
How to compress an image
- Drop or pick a JPG, PNG, WebP or GIF file.
- Choose Lossy for the smallest file, or Lossless to keep every pixel — then tune the quality and keep or strip metadata.
- Compress, preview the before/after, and download — all on your device.
Why compress images?
Smaller images load faster, lift your Core Web Vitals and SEO, and cut bandwidth for you and your visitors. OptImg does it locally with the same Rust codecs used server-side elsewhere — so you get the compression without the upload wait, the queue, or handing your photos to a third party.
Frequently asked questions
- Are my images uploaded to a server?
- No. Compression runs entirely in your browser with WebAssembly — your image never leaves your device, and there are no size or file-count limits.
- What's the difference between lossy and lossless?
- Lossy re-encodes the image at a quality you choose for the smallest files (imperceptible at high quality). Lossless keeps every pixel identical and only removes redundancy — larger than lossy, but pixel-perfect.
- Does it keep animation and transparency?
- Yes. Animated GIFs stay animated — every frame, delay and loop is preserved. PNG and WebP transparency is kept. EXIF orientation is baked in so photos always display upright.