Image Compressor — Shrink JPEG, PNG and WebP Images in Bulk avatar

Image Compressor — Shrink JPEG, PNG and WebP Images in Bulk

Pricing

from $1.00 / 1,000 results

Go to Apify Store
Image Compressor — Shrink JPEG, PNG and WebP Images in Bulk

Image Compressor — Shrink JPEG, PNG and WebP Images in Bulk

Image compressor and optimizer: compress images in bulk by URL to reduce image size, keeping the format. JPEG with mozjpeg, PNG with palette quantisation, WebP and AVIF at your quality; optional max width. Reports size before and after and links each file.

Pricing

from $1.00 / 1,000 results

Rating

0.0

(0)

Developer

Ponderable Hydrometer

Ponderable Hydrometer

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

3 days ago

Last modified

Features

Limited permissions

Share

Smaller images, same format, no quality cliff. Feed a list of image links and get compressed files back, with the bytes saved for each. JPEG goes through mozjpeg, PNG through palette quantisation; WebP and AVIF are re-encoded at your quality. Use it to reduce image size for websites, newsletters and uploads.

What you can do with it

  • Speed up a website by shrinking product photos, banners and blog images before you upload them.
  • Reduce image size in bulk: list as many image links as you need, each gets its own compressed file.
  • Resize while compressing: set maxWidth to downscale large originals (images are never enlarged).
  • Measure the gain: every row reports originalBytes, bytes and savedPercent.

Input

FieldTypeDefaultDescription
imageUrlsarray—Direct image links.
qualityinteger751–100.
maxWidthinteger0Downscale to this width; 0 keeps the size.
keepOriginalIfLargerbooleantrueReturn the original when compression would not help.

Example: {"imageUrls": ["https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg"], "quality": 70, "maxWidth": 1600}

What you get

One row per image: imageUrl, fileUrl (the compressed file in the run's key-value store), format, width, height, originalBytes, bytes, savedPercent, keptOriginal.

Output sample

{
"imageUrl": "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg",
"fileUrl": "https://api.apify.com/v2/key-value-stores/abc/records/image-1.jpg",
"format": "jpeg",
"width": 3000,
"height": 2000,
"originalBytes": 2145678,
"bytes": 812345,
"savedPercent": 62,
"keptOriginal": false
}

Use it from the API or an AI agent

Start a run and read the results back in one HTTP call:

curl -X POST "https://api.apify.com/v2/acts/ponderable_hydrometer~image-compressor/run-sync-get-dataset-items?token=<YOUR_API_TOKEN>" \
-H "Content-Type: application/json" \
-d '{"imageUrls": ["https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg"], "quality": 75}'

AI agents can call it through the Apify MCP server: https://mcp.apify.com?tools=ponderable_hydrometer/image-compressor.

How it works

The Actor downloads each image, detects its real format and re-encodes it in the same format with the sharp library: mozjpeg for JPEG, palette quantisation for PNG, and the chosen quality for WebP and AVIF. The result is saved in the run's key-value store and fileUrl points to it. The image is rotated according to its orientation information.

Limits and good to know

  • The format never changes; to convert between formats use an image converter.
  • Compression is lossy: PNG palette quantisation reduces the number of colours and JPEG, WebP and AVIF lose detail as quality drops. Try 70–80 first and compare.
  • Metadata such as EXIF is not guaranteed to be kept.
  • With keepOriginalIfLarger on, an image that would grow is returned unchanged (keptOriginal: true). When maxWidth is set the resized version is always returned.
  • Files live in the run's key-value store and follow its retention.
  • Animated GIFs and SVGs are not supported. An image that cannot be downloaded or decoded is skipped with a warning in the log and is not billed; if every image fails, the run ends as FAILED.

FAQ

Which formats are supported? JPEG, PNG, WebP and AVIF, detected from the file content, not the link.

Can it convert PNG to WebP? No, the format stays the same. Use an image converter for that.

Can I upload files instead of links? No, images are fetched from public links.

Pricing

Pay per result — $1.00 per 1,000 results (one image = one result), plus Apify's standard per-run start event ($0.00005 per GB of memory, so a fraction of a cent per run). No subscription.