Image Converter & Compressor: WebP, AVIF, JPEG, PNG avatar

Image Converter & Compressor: WebP, AVIF, JPEG, PNG

Pricing

$2.00 / 1,000 image converteds

Go to Apify Store
Image Converter & Compressor: WebP, AVIF, JPEG, PNG

Image Converter & Compressor: WebP, AVIF, JPEG, PNG

Convert and compress images from URLs to WebP, AVIF, JPEG or PNG, with optional resizing. Returns a download link plus before/after size for each image. Bad URLs become error rows and are never charged. Works from AI agents via Apify MCP.

Pricing

$2.00 / 1,000 image converteds

Rating

0.0

(0)

Developer

Adam Schepis

Adam Schepis

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

5 days ago

Last modified

Features

Limited permissions

Share

Convert and compress images in bulk from their URLs. Give it a list of image links (JPEG, PNG, WebP, AVIF, GIF or TIFF) and pick an output format: WebP, AVIF, JPEG or PNG, or keep each image's own format and just compress it. Optionally shrink images to fit a maximum width and height.

For every URL you get one dataset row with a download link to the converted file, the input and output format, the size before and after, the percentage saved, and the final dimensions. A link that fails becomes an error row that says why, the rest of the batch carries on, and failed images are never charged.

Works from AI agents too: call it as a tool through Apify's MCP server to convert or shrink an image mid-conversation and hand back a link.

What you get

  • WebP, AVIF, JPEG or PNG output, or "keep" to re-compress in the original format.
  • Resize without distortion: set maxWidth and/or maxHeight and each image is scaled down to fit inside that box, aspect ratio kept. Small images are never enlarged.
  • Photos come out the right way up. The EXIF orientation tag is applied to the pixels, so phone photos don't turn up sideways after conversion.
  • Metadata stripped by default: camera data, GPS location and timestamps are removed, which makes files smaller and keeps photo locations private. Turn stripMetadata off to keep them.
  • Clear results for every URL: an ok row with a download link and sizes, or an error row with a code and a plain-English reason. One bad link never fails the run.
  • Animated GIFs: converting to WebP keeps the animation. Converting to JPEG, PNG or AVIF keeps the first frame, and the row's note says so.
  • Pay only for converted images, charged after the file is saved.

Built on sharp (libvips), with mozjpeg for JPEG output.

Input

FieldTypeRequiredDescription
imageUrlsarray of URLsyesPublic http/https links to image files, up to 25 MB and 50 megapixels each.
formatstringno (default webp)webp, avif, jpeg, png, or keep to re-encode in the input's own format.
qualityinteger 1-100no (default 80)Lower is smaller with more visible compression. Not used for PNG, which is lossless.
maxWidthintegernoShrink images wider than this. Never enlarges.
maxHeightintegernoShrink images taller than this. With both set, the image fits inside the box.
stripMetadatabooleanno (default true)Remove EXIF, XMP and IPTC data from the output.
maxResultsintegerno (default 1000)Process at most this many URLs; the rest are skipped and not charged.

Example input:

{
"imageUrls": [
{ "url": "https://upload.wikimedia.org/wikipedia/commons/1/1e/Apollo_11_first_step.jpg" },
{ "url": "https://upload.wikimedia.org/wikipedia/commons/a/a9/Example.jpg" }
],
"format": "jpeg",
"quality": 75,
"maxWidth": 400
}

Output example

One row per input URL. This is a real row from a run of the input above:

{
"sourceUrl": "https://upload.wikimedia.org/wikipedia/commons/1/1e/Apollo_11_first_step.jpg",
"status": "ok",
"error": null,
"errorMessage": null,
"outputUrl": "https://api.apify.com/v2/key-value-stores/S7QfUXsXl2oXB1M3G/records/image-0001-Apollo-11-first-step.jpg?signature=16V31efH90vTunVgw3Jy1",
"outputKey": "image-0001-Apollo-11-first-step.jpg",
"inputFormat": "jpeg",
"outputFormat": "jpeg",
"inputBytes": 87083,
"outputBytes": 9857,
"savingsPercent": 88.7,
"width": 400,
"height": 304,
"animated": false,
"note": null,
"processedAt": "2026-11-20T01:35:35.835Z"
}

A URL that fails produces the same shape with status: "error" and nothing in the output fields:

{
"sourceUrl": "https://example.com/",
"status": "error",
"error": "not-an-image",
"errorMessage": "The URL returned text/html content, not an image.",
"outputUrl": null,
"outputKey": null,
"inputBytes": 577,
"outputBytes": null,
"savingsPercent": null
}

The converted files are saved in the run's default key-value store under outputKey; outputUrl downloads the file directly. Download the rows as JSON, CSV or Excel, or read them through the Apify API.

Error codes

errorMeaning
invalid-urlNot a valid URL, or it has a username/password in it.
blocked-schemeNot http or https.
blocked-addressThe host is, or resolves to, a private, loopback, link-local or reserved network address. Checked again on every redirect.
unreachableDNS failed or the server could not be reached.
http-errorThe server answered with an error status, such as 404 or 403.
timeoutThe download took longer than 30 seconds.
too-many-redirectsMore than 5 redirects.
file-too-largeThe file is over 25 MB.
not-an-imageThe URL returned something that is not an image, such as an HTML page.
unsupported-formatAn image format this Actor does not read, such as SVG or HEIC.
image-too-largeOver 50 megapixels (all frames counted, when an animation is kept).
conversion-failedThe image is damaged or could not be encoded.

Pricing

This Actor uses pay-per-event pricing. You pay for one event, image-converted, once per image that was converted and saved. The exact price is shown on the Actor's Store page before you run it.

EventWhen it's charged
image-convertedOnce per image, after the converted file is saved to the key-value store and its row is in the dataset.
  • Error rows are free. A URL that fails to download, isn't an image, or fails to convert is never charged.
  • Your spending limit is respected. When the run's maximum cost is reached, the Actor stops before starting another image.

Good to know

  • Savings depend on the source. Shrinking a large image or converting a PNG photo gives big savings. Re-encoding a full-size JPEG that is already well compressed may save little, and PNG output from a photo is usually larger than the JPEG it came from; savingsPercent is negative when that happens. In our test runs, a 4073752-byte PNG became an 81865-byte AVIF at 800 px wide (98% smaller), while a 2684586-byte, 4335x2990 JPEG scan re-encoded to WebP at full size and quality 80 became 2496334 bytes (7% smaller).
  • JPEG has no transparency: transparent areas become white.
  • Images are processed one at a time, in the order given.
  • The link must be publicly reachable. The Actor downloads each file itself, so links behind a login, or hosts that block automated downloads, will fail with an error row.
  • Private network addresses are refused for safety, including links that redirect to one.
  • Sharing outputUrl: the link points at the file in the run's key-value store and opens without an API token. If your account restricts storage access, the link includes a signature parameter that unlocks that one file. Files live as long as the run's storage is retained on your plan, so copy them somewhere permanent if you need them long term.

Why this Actor

  • Every URL gets a row that says exactly what happened, and a bad URL never fails the whole batch.
  • You see the size before and after for each image, so you know what the conversion bought you.
  • EXIF rotation, transparent-to-JPEG and animated GIFs are handled deliberately, not left to chance.

Notes

  • Built with sharp (Apache-2.0) and the Apify SDK for JavaScript.
  • Sample images in the default input are public-domain files from Wikimedia Commons: Hokusai's The Great Wave off Kanagawa, NASA's Earth Western Hemisphere, and NASA's Apollo 11 first step.