Compressed image
What this tool does
This tool makes an image lighter. It re-encodes the file with a lower quality and can also downscale it to a maximum width or height, which is what really reduces the size of photos taken with a phone or a camera.
When to use it
- Uploading product photos to a web or a marketplace with limits.
- Sending images by email or through a form.
- Reducing storage cost of a media library.
- Preparing thumbnails or previews from large originals.
What to expect
You receive a link to the compressed image, the size before and after, the percentage saved and the final dimensions. If the result would be bigger than the original, the original is returned untouched and kept_original is true.
Limitations
- Quality below 50 is visible on photos with gradients or text.
- Images are never upscaled: a smaller image keeps its dimensions.
- GIF input is re-encoded as PNG (animation is not preserved).
When it fails
- The URL is not a readable image.
- The quality or the maximum dimensions are invalid.
- The file exceeds 25 MB.
Good to know
- WebP usually gives the smallest file keeping good quality.
- Use
max_widthto cap the size without thinking about quality. - For screenshots and logos, PNG with no downscale is often the best option.
Input data
| Parameter | Required | Example | Description |
|---|---|---|---|
url | Yes | https://public.downloads.uproc.io/samples/uproc-og.png | Public URL of the image. |
quality | No | 70 | Quality between 1 and 100. Default 70. |
max_width | No | 1600 | Optional maximum width in pixels (never upscales). |
max_height | No | - | Optional maximum height in pixels (never upscales). |
format | No | original | Output format: original, jpeg, png or webp. |
Output data
| Field | Description |
|---|---|
result | Signed URL of the compressed image. |
size_before | Original size in bytes. |
size_after | Resulting size in bytes. |
saved_percent | Percentage of size saved. |
width | Width of the resulting image in pixels. |
height | Height of the resulting image in pixels. |
kept_original | True when compression did not help and the original is returned. |