Image Compression & WebP AVIF Converter (Erdnal Media) avatar

Image Compression & WebP AVIF Converter (Erdnal Media)

Pricing

from $2.40 / 1,000 image credits

Go to Apify Store
Image Compression & WebP AVIF Converter (Erdnal Media)

Image Compression & WebP AVIF Converter (Erdnal Media)

Bulk image compressor and image compression API: convert JPG/PNG to WebP or AVIF from image URLs, resize, set quality, strip metadata, without visible quality loss. Pay only for successful images.

Pricing

from $2.40 / 1,000 image credits

Rating

0.0

(0)

Developer

Erdnal

Erdnal

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

a day ago

Last modified

Share

A bulk image compressor and image compression API for lists of image URLs: convert JPG to WebP, PNG to AVIF, resize, set the quality and remove metadata, then download the optimized files with a report for every image. The default quality settings compress images without visible quality loss. You pay only for images that were optimized successfully.

What it does

  • Input: public URLs of JPEG or PNG images, up to 1,000 per run (for example the output of a scraper or an export of your product catalog).
  • Conversion: WebP, AVIF, JPEG or PNG output, with optional resizing (aspect ratio kept by default, smaller images never enlarged unless you ask for it) and adjustable quality.
  • Metadata removal: EXIF, XMP, comments and GPS location are removed by default; the ICC colour profile is kept so colours stay correct.
  • Output: the optimized images in the run's key-value store (image-0000.webp, image-0001.webp, …) and one dataset row per image with the link to the file, its dimensions, the size before and after, the percentage saved and the credits charged.
  • Safe input handling: the real file format is checked (a renamed file is rejected, not trusted), and each image is processed in an isolated, resource-limited process.

Example: the demo photo (3000×2000 JPEG, 540 KB) becomes a 1600 px wide WebP of 42 KB, 92 % lighter. Savings depend on the source image.

Use cases

  • E-commerce catalogs: a bulk image optimizer for product photos before importing them into a store or a marketplace feed.
  • Websites: compress images for website pages to reduce page weight.
  • CMS and blogs: convert JPG to WebP or PNG to AVIF for an existing media library, then re-upload the files.
  • Scraping pipelines: chain it after a scraper that collects image URLs.

How to use

  1. Paste the image URLs into Image URLs (one per line).
  2. Choose the output format and, if needed, a maximum width or height.
  3. Click Start. When the run ends, open the Output tab: the table links to each optimized image.

Input example:

{
"imageUrls": [
"https://api.erdnal.com/v1/media/samples/demo-photo.jpg"
],
"format": "webp",
"width": 1600,
"quality": 80
}
FieldDescriptionDefault
imageUrlsPublic https:// URLs of JPEG or PNG images (1 to 1,000)—
formatwebp, avif, jpeg or pngwebp
width / heightMaximum size in pixelsoriginal size
quality1 to 100 (ignored for PNG, which is lossless)WebP 80, AVIF 60, JPEG 82
keepAspectRatioOff: resize to exactly width × height (both required)on
allowUpscaleEnlarge images smaller than the requested sizeoff
keepMetadataKeep EXIF/XMP/comments (including GPS location)off

Output example

One dataset row per image:

{
"index": 0,
"imageUrl": "https://api.erdnal.com/v1/media/samples/demo-photo.jpg",
"ok": true,
"outputKey": "image-0000.webp",
"outputUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/image-0000.webp",
"format": "webp",
"contentType": "image/webp",
"width": 1600,
"height": 1067,
"originalBytes": 539584,
"outputBytes": 42298,
"savingsPercent": 92.2,
"creditsCharged": 1,
"errorCode": null
}

A failed image has ok: false, creditsCharged: 0 and an errorCode, and the run goes on with the next image.

Pricing

Pay per event: $0.003 per credit. Apify Store discounts apply to paid Apify plans: 10 % off on Bronze, 15 % on Silver, 20 % on Gold and above. The price of an image depends on the size of the image produced:

Output sizeWebP / JPEG / PNGAVIF
up to 3.2 MP (Full HD, 2048 px wide)1 credit ($0.003)3 credits ($0.009)
up to 8.4 MP (4K UHD)2 credits ($0.006)6 credits ($0.018)
up to 16.8 MP3 credits ($0.009)10 credits ($0.030)
up to 25 MP4 credits ($0.012)15 credits ($0.045)

A tiny start fee ($0.00005) is charged per run.

A PNG source larger than 8.4 MP adds 2 credits. Failed images are free (unreachable URL, unsupported file, image too large). Resizing to the size you display is cheaper and faster.

The Actor respects your maximum cost per run: before each image, it checks that your remaining budget covers the highest possible price of that image, and stops otherwise. Setting both width and height lowers that ceiling.

FAQ

How do I convert JPG to WebP? Put the JPG URLs in the input, keep format on webp and start the run. WebP gives a good balance between file size and encoding speed, and current browsers support it.

How do I convert PNG to AVIF? Set format to avif. AVIF files are often the smallest, but encoding needs more processing, so AVIF costs 3 times more credits than WebP. Transparency is kept in WebP, AVIF and PNG output; in JPEG it is flattened on a white background.

Can I compress images in bulk? Yes: up to 1,000 URLs per run, processed one after the other. For larger sets, split them into several runs.

Is metadata removed? Yes, by default: EXIF, XMP, comments and GPS location are removed. The ICC colour profile is kept. Enable keepMetadata to keep them.

Where are my images processed, and are they kept? Images are downloaded and processed by the Image Compression & WebP AVIF Converter API by Erdnal, hosted in the European Union, only to produce the result. Erdnal does not keep the images of this Actor after the response. The optimized files are stored in your Apify storage, under your Apify account's data retention.

Why did an image fail? Each failed image has an errorCode:

  • image_url_unreachable: the host could not be reached or returned an error;
  • image_url_redirect: redirects are not followed, use the final image URL;
  • image_url_forbidden: only public https:// URLs on port 443 are accepted;
  • unsupported_format / malformed_image: not a valid JPEG or PNG file;
  • file_too_large: 15 MB per image at most;
  • too_many_pixels / dimensions_too_large: 25 MP and 10,000 px per side at most;
  • output_too_large: requested output above 25 MP or 8,000 px per side;
  • avif_requires_batch: AVIF output above 16.8 MP is not available in this Actor.

Use it from AI agents (MCP)

AI agents can run this Actor through the Apify MCP server (Claude, Cursor, VS Code, GitHub Copilot, Codex). Add this server URL to your MCP client and sign in with your Apify account when asked:

https://mcp.apify.com?tools=erdnal_api/erdnal-media-image-optimizer

The agent sees the input and output schemas, runs the Actor and reads the results; runs are billed per event, like a normal run.

Integrations

  • API: start runs and read results with the Apify API or the Apify clients for JavaScript and Python.
  • Make, Zapier, n8n: use the Apify integrations of these tools to run the Actor and send the optimized image links to your store, CMS or spreadsheet.
  • Webhooks: call your own endpoint when a run finishes.

More from Erdnal

  • PDF to Text & OCR: extract text from PDFs and scanned images, and turn invoices and receipts into JSON.
  • Published tasks of this Actor: ready-made presets such as JPG to WebP, PNG to AVIF, Shopify image compression, thumbnails, email images and EXIF/GPS removal (see the Examples tab).

Support

support@erdnal.com — include the requestId of the image concerned. See the Image Compression & WebP AVIF Converter terms of use and privacy policy.