Image Compressor
Shrink JPG, PNG, WebP, AVIF or GIF images: convert, resize, strip metadata and compare sizes.
Try an example: PNG gradient to WebP · JPEG photo to a smaller JPEG, max 64 px wide
How it works
Re-encodes an image as WebP, AVIF, JPEG or PNG at the quality you choose, optionally scales it down to a maximum width or height and removes metadata such as GPS location. Shows the before/after size, the saving and the new dimensions, with a preview and a download.
- The file type is detected from its first bytes, not from the file name; only JPEG, PNG, WebP, AVIF and GIF are accepted. For animated GIFs only the first frame is used.
- ImageMagick decodes the image, applies the EXIF orientation, optionally scales it down (never up) to fit the maximum width/height, and encodes it in the chosen format. AVIF is encoded with libavif (avifenc) when it is installed.
- Quality is passed to the encoder as is (1–100). PNG output is lossless, so quality does not apply; PNG is usually larger than WebP/AVIF for photos.
- With "Remove metadata" on, EXIF/XMP/IPTC data (including GPS location and camera details), comments and embedded profiles are removed. Timestamps are never written, so the same input always gives the same file.
- Files are processed in a private temporary folder that is deleted right after processing. The result is kept for about 2 hours so you can download it, then deleted.
Lossy formats (WebP, AVIF, JPEG) discard detail; keep your original.
For scripts and AI agents
- JSON API:
POST https://imagecompressor.usefulweb.site/api/v1/calculate(same calculation as this page) - Interface description: OpenAPI 3.1 · AI guide: llms.txt
- MCP server (Streamable HTTP):
https://imagecompressor.usefulweb.site/mcp· tool nameimage_compressor
Example request
curl -s -X POST https://imagecompressor.usefulweb.site/api/v1/calculate \
-H 'content-type: application/json' \
-d '{"file":{"filename":"gradient.png","contentType":"image/png","contentBase64":"iVBORw0KGgoAAAANSUhEUgAAADAAAAAgEAIAAACLJrAIAAAAvElEQVRo3u3ZIRLDMAxE0XZmPSqzUA4W3h40uVRwQgqEJcEE/HcCg7W1tt/Lsq7H8UJCNsd2fe9exnPJXPv5u3sZz0WCGrI5SFBBNrWdJCgl87FdJCgVW4wEpWRzbJxBOZmLKVZgijVii5GglGyOnSmWkzk9qBJXDRKUogc19HHRgwpxSJOgFE26IXN6UEU2RQ8q0KQb3MUa8WBGglLx5EqCUvSgRox5EpTiV6PBe1CDHtSQOT2oIpv8alT+GThGqh2cdAQAAAAASUVORK5CYII="},"format":"webp","quality":75}'