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 save, 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 high-quality optimization the best tools use, 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?
- It runs at native speed entirely in your browser: nothing is uploaded, 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.
- How much smaller will my image actually get?
- It depends far more on the original than on the tool. A photo straight from a phone or camera is usually saved at a very high quality setting and has a lot of room: cuts of 70–90% at the default quality are common and normally invisible at normal viewing size. An image that has already been through a compressor, or a screenshot saved as PNG, has much less slack and may only shed a few percent. If a run cannot produce a smaller file than the original, we hand the original back rather than give you a worse copy of the same size.
- What quality setting should I use?
- The default of 82 is chosen to be visually indistinguishable from the original for ordinary photographs while cutting most of the weight. Going down to about 75 is still fine for large background images and social posts, and is worth trying when a page needs to be lean. Below roughly 60 you start to see blotches in skies, gradients and flat colour areas. Go up towards 90 only when the image will be zoomed, printed, or edited again later. The before/after preview is there so you can judge your own image rather than trust a number.
- Why is my PNG barely getting smaller?
- Lossless compression can only remove redundancy that is genuinely there, so its results vary enormously by content. Screenshots, diagrams, logos and flat-colour graphics compress very well. Photographs saved as PNG do not, because photographic noise is not redundant. If your PNG is a photo, converting it to JPG or WebP will shrink it far more than any lossless pass, and the Convert tool will do that.
- Does compressing the same image twice make it smaller again?
- Barely, and it costs you quality. Lossy compression discards detail permanently, so a second pass re-encodes an already-degraded image and mostly adds new artefacts rather than saving bytes. If the result is not small enough, go back to the original file and use a lower quality setting once, instead of stacking passes.
- Does compressing remove my photo's location and camera data?
- By default, yes. Stripping metadata removes EXIF fields such as GPS coordinates, camera model, serial number and capture time, which also saves a little space. Orientation is handled first and baked into the pixels, so the photo still displays the right way up. You can switch metadata off if you need to keep copyright or colour-profile information, and the dedicated Remove EXIF tool does the same job without re-compressing.