Image Converter & Compressor: WebP, AVIF, JPEG, PNG in Bulk
Pricing
from $1.60 / 1,000 converted images
Image Converter & Compressor: WebP, AVIF, JPEG, PNG in Bulk
Image converter and compressor: convert JPEG, PNG, GIF, TIFF and WebP images from links or dataset fields to WebP, AVIF, JPEG or PNG, resized, with GPS/EXIF removed, plus one ZIP link. Responsive sizes and a KB target. $0.002 per image up to 16 MP, lossless +$0.0025 per started 4 MP; failed free.
Pricing
from $1.60 / 1,000 converted images
Rating
0.0
(0)
Developer
Klarto
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
7 hours ago
Last modified
Categories
Features
Share
Image converter and compressor for Apify: convert JPEG, PNG, GIF, TIFF, BMP, AVIF and WebP images from links or from a field of your datasets to WebP, AVIF, JPEG or PNG, resized and with GPS/EXIF data removed, and get one ZIP link for all files. $0.002 per converted image up to 16 megapixels (a 12 MP phone photo at full size); bigger files pay $0.002 per further started 16 MP. Lossless output (PNG or lossless WebP) adds $0.0025 per started 4 MP. Failed and unsupported images are free.
Why use it:
- Smaller files for the web. WebP and AVIF output, quality you choose, and an optional size target in KB: the highest quality from 20 up to yours that fits is used, and the row's note says when none fits.
- Responsive sizes in one run. Give widths such as
[480, 960, 1600]and get one file per width for asrcset. - Privacy by default. EXIF, XMP and comments (camera, GPS position, dates) are removed; the photo is turned upright first and the color profile is kept.
- Works after scrapers. Pick a dataset and the field with the image links (for example the
fileUrlof Bulk File Downloader orimages.*.urlof a scraper). - Safe with any link. Only public addresses, every redirect checked, sizes and pixels capped, conversions in separate processes with a time limit.
What it does
- Input: image links in
images, ordatasetswith the fields that hold the links (imageFields). - Reads: JPEG (also MPO from phones), PNG, WebP, GIF, TIFF, BMP, AVIF and ICO. HEIC, SVG and camera RAW files are not supported: they get a row with status
errorand are free. RAW files are recognised by the file name (.dng, .nef, .cr2 …), the Content-Type (image/x-nikon-nef …), the DNG tag, or a TIFF that starts with a reduced-size preview. - Writes: WebP, AVIF, JPEG or PNG, or the same format as the source (GIF, TIFF, BMP and ICO become PNG). Animated GIF, WebP, PNG and AVIF stay animated in WebP, AVIF or PNG output (up to 300 frames, within the memory budget). Multi-page TIFF: the first page. MPO photos from phones: the main picture.
- Output: the files in the run's key-value store (keys
img-00001-<name>.<ext>), one dataset row per output file, and anOUTPUTsummary with azipUrlthat downloads all files as one ZIP.
How it works
- Collect the links. From
imagesfirst, then from your datasets, each link once, up tomaxImages. A value inimagesthat is not an http(s) link gets anerrorrow. - Download safely. The host must resolve to a public IP; private, loopback and cloud metadata addresses are refused, and every redirect is checked again. Answers that are not images (HTML, SVG) are refused before the body is read. HTTP 408, 425, 429, 500, 502, 503, 504 and dropped connections get 2 more tries.
- Check before decoding. Pillow opens only the formats above. The size in the file header (also of images inside ICO files and of animation frames) is checked against the run's memory before the pixels are decoded: about 32 bytes per source pixel (twice that for transparent images), all frames of an animation counted, and about 56 bytes per AVIF output pixel (70 with transparency). A small file that claims a huge size is refused. Damaged files get a row with the reason.
- Convert. In a child process with a time limit (
timeoutSecs, counted from when a process is free): EXIF orientation applied, palette and transparency expanded, CMYK turned into sRGB with its own color profile, resized with Lanczos (never enlarged), alpha flattened ontobackgroundfor JPEG, encoded with Pillow 13 (libwebp, libavif, libjpeg). - Save, then charge. Each file is uploaded to the key-value store, its row is written (
billable: true), and only then charged. After a restart, saved rows are matched to their link bysourceId, never by position, so nothing is converted or charged twice.
The User-Agent is KlartoImageConverter/0.1 (+https://apify.com/klarto). The Actor keeps no cookies. Your images are processed in the run only; they are not sent to any outside service.
Input
| Field | Default | What it does |
|---|---|---|
images | — | Direct image links, one per line. |
datasets / imageFields | — / ["url"] | Datasets whose rows hold image links, and the fields: imageUrl, images.0, images.*.url. |
format | webp | webp, avif, jpeg, png or same. |
quality | 80 | 1–100 for WebP, AVIF and JPEG. |
maxKb | 0 | Size target in KB (1 KB = 1,024 bytes) for WebP (not lossless), AVIF and JPEG: the quality is lowered from quality, never below 20, and a quality of 20 or less is kept as it is; the row's note says when the target was not reached. 0 = none. |
maxWidth / maxHeight | 0 / 0 | Shrink to fit; 0 = no limit. Never enlarges. |
fit | inside | inside (no crop), cover (crop the center to the box), contain (pad to the box). Cover and contain need both sizes. |
widths | — | Several widths per image, e.g. [480, 960, 1600]; each width is one file. Widths not smaller than the image are made once at the original size. |
stripMetadata | true | Remove EXIF, XMP and JPEG comments (GPS, camera, dates). |
keepAnimation | true | Keep animated images animated (WebP, AVIF, PNG output). |
lossless | false | Lossless WebP; adds lossless-4mp. Not available for AVIF. |
background | #ffffff | For transparent areas in JPEG and the border of contain. |
maxImages, maxFileSizeMb, timeoutSecs, maxConcurrency | 1,000, 50, 120, 4 | Limits. |
Minimal input:
{ "images": ["https://images-assets.nasa.gov/image/as11-40-5903/as11-40-5903~orig.jpg"], "format": "webp", "maxWidth": 1920 }
Responsive AVIF set from a dataset:
{ "datasets": ["<datasetId>"], "imageFields": ["imageUrl"], "format": "avif", "widths": [480, 960, 1600] }
Output
A real row from a platform run (2026-11-19; the signed link shortened):
{"imageIndex": 0,"sourceId": "2603a5a56ea62a1f7376","url": "https://images-assets.nasa.gov/image/as11-40-5903/as11-40-5903~orig.jpg","variant": null,"status": "ok","error": null,"note": null,"sourceFormat": "JPEG","sourceWidth": 5189,"sourceHeight": 5067,"sourceBytes": 3183792,"format": "webp","width": 5189,"height": 5067,"frames": 1,"bytes": 1693140,"savedPercent": 46.8,"quality": 80,"fileName": "as11-40-5903_orig.webp","key": "img-00001-as11-40-5903_orig.webp","fileUrl": "https://api.apify.com/v2/key-value-stores/4YeMskdATk0y0K4qH/records/img-00001-as11-40-5903_orig.webp?signature=…","metadataRemoved": true,"finalUrl": "https://images-assets.nasa.gov/image/as11-40-5903/as11-40-5903~orig.jpg","httpStatus": 200,"sources": ["input"],"billable": false,"ms": 2463,"convertedAt": "2026-11-19T13:53:59Z"}
(billable was false because prices were not set yet in that run; sourceId and the name billable come from the current build, the other values from that run.)
| Field | Type | Meaning |
|---|---|---|
status | text | ok, error (not converted: the reason is in error) or skipped (not saved and free: the run's timeout, or the run's maximum charge — an image is skipped for the charge only when its full price, extra 16 MP blocks included, is more than what is left of the maximum charge; the error states both amounts, and smaller images after it still run). |
fileUrl, key, fileName | text | Signed link to the converted file (opens without a token), its record key, its name. |
format, width, height, frames, bytes, quality | text, numbers | The output file. |
sourceFormat, sourceWidth, sourceHeight, sourceBytes, savedPercent | text, numbers | The source and how much smaller the output is (negative when bigger). |
variant | number | The width asked for in widths; null otherwise. |
note | text | E.g. "only the first frame was kept", "could not reach 200 KB even at quality 20". |
imageIndex, sourceId, url, finalUrl, httpStatus, sources | number, text | Which link the row belongs to (sourceId is a hash of the link, stable across restarts), the address after redirects, and where the link came from. |
billable, ms | boolean, number | Whether the row is billed: it is saved first and charged right after (a charge that still fails after retries is counted in OUTPUT.imagesNotCharged); conversion time. |
The OUTPUT record holds the counts (converted, outputs, errors, skipped), outputFormats, sourceBytes, outputBytes, savedPercent, what was charged (chargedImages, charged16mpBlocks, chargedLossless4mpBlocks, and imagesNotCharged), failures and zipUrl. Files follow Apify data retention; copy them if you need permanent links.
Pricing
| Event | When | Price |
|---|---|---|
image-converted | One converted file saved, up to 16 megapixels | $0.002 |
extra-16mp | Each further started 16 megapixels of a file (frames of an animation count) | $0.002 |
lossless-4mp | Each started 4 megapixels of a lossless file: PNG output (also same that gives PNG) or lossless WebP (frames count) | $0.0025 |
Paid Apify plans pay less. Apify Store discounts apply automatically: image-converted: Bronze 5%, Silver 10%, Gold and higher 20% off; extra-16mp: Bronze 10%, Silver 20%, Gold and higher 30% off; lossless-4mp: Bronze 5%, Silver 5%, Gold and higher 5% off. The prices above are Free-plan prices; the Store card shows the lowest (Gold) price. The start event (apify-actor-start) has no discount.
Free: images that fail (download errors, HTTP errors, blocked addresses, unsupported or damaged files, too large for the run's memory, time-outs) and images not started because of the charge limit or the run timeout.
Apify also charges its start event, apify-actor-start: $0.00005 per GB of run memory, so $0.00005 per run at the default 1 GB.
Examples (a block is 16,000,000 pixels; every started block after the first is one extra-16mp):
- 1,000 product photos resized to 1920 px WebP (1920 × 1280 px each): 1,000 × $0.002 = $2.00.
- A 12-megapixel phone photo (4032 × 3024 px) at full size: $0.002.
- A 24-megapixel photo (6000 × 4000 px, 2 blocks): $0.002 + $0.002 = $0.004.
- A 48-megapixel photo (8064 × 6048 px = 48.8 MP, 4 blocks): $0.002 + 3 × $0.002 = $0.008. It needs 2 GB of memory: at the default 1 GB the limit is 33.5 MP, and a bigger photo gets a free
errorrow. - A responsive set of 3 widths (480, 960 and 1600 px): 3 × $0.002 = $0.006 per image.
- A 2-megapixel graphic (1600 × 1250 px) as lossless WebP: $0.002 + $0.0025 = $0.0045.
- A 16-megapixel photo (4000 × 4000 px) as PNG or lossless WebP: $0.002 + 4 × $0.0025 = $0.012.
- A responsive set of 3 lossless WebP widths from a 3:2 photo of 3000 × 2000 pixels, so files of 480 × 320, 960 × 640 and 2500 × 1667 px: each file counts its own blocks, 3 × $0.002 + (1 + 1 + 2) × $0.0025 = $0.016.
Limits
- Up to 10,000 images per run.
- Pixels per image depend on memory. At the default 1 GB: about 33 megapixels per image and per output (67 at 2 GB); about 16 megapixels for transparent images and their WebP/PNG outputs, and for lossless WebP; about 19 (opaque) or 15 (transparent) megapixels per AVIF output. Measured 2026-11-20 in a 1 GB container (
--memory 1g --memory-swap 1g, the file server outside it), peak memory of all processes together at these limits: grainy photos (Gaussian grain σ 15) 626 MB as WebP, 351 MB as JPEG, 314 MB as PNG, 658 MB as AVIF, 816 MB as lossless WebP and 506 MB as transparent WebP; per-pixel random noise, the hardest content for the encoders, 894 MB as WebP (the highest), 829 MB as lossless WebP and 677 MB as AVIF; 4 such images at once 907 MB. Nothing ran out of memory, but noise-like images leave the least room: if one does, its row is a freeerrorsaying it needs more memory, and 2 GB doubles every limit above (the same noise image peaked at 903 MB of 2,048). Bigger images get a row with the reason and are free; give the run more memory or setmaxWidth. - WebP allows at most 16,383 px per side.
- PNG and lossless WebP are the slowest outputs: a 16 MP photo took 8.4 (PNG) and 32.6 (lossless WebP) CPU-seconds in our test, against 5.7 for WebP; hence the
lossless-4mpprice. - Source files up to 500 MB (
maxFileSizeMb). The run's disk (twice its memory) holds the source and the outputs of every image in progress, so fewer images run at once when files are big. - JPEG allows at most 65,500 px per side.
- Measured on the platform at 1 GB (2026-11-19): three images (a 26-megapixel 3.2 MB JPEG, a small JPEG, a TIFF) in a 6-second run, the big one 46.8 % smaller as WebP; the same photo as AVIF in 3 widths in a 5-second run.
- Speed at Apify's CPU share (1/8 of a core per GB of memory), measured 2026-11-19 in Docker on a 2017 laptop CPU (Apify hosts may be faster, and some give a run more than its share): at the default 1 GB, real photos to WebP took 32 s (8 MP), 53 s (16 MP), 71 s (24 MP) and 97 s (33 MP); to AVIF 97 s (8 MP) and 133 s (16 MP, over the default
timeoutSecsof 120 s). Twice the memory brings twice the CPU and about half the time: at 2 GB, 33 MP to WebP took 47 s, 24 MP to AVIF 96 s and 33 MP to AVIF 119 s. On the platform (2026-11-19, 1 GB) runs were much faster: five photos of 6–30 MP all converted to WebP, and the three up to 16 MP to AVIF, within the default limit. If images time out, give the run 2 GB for AVIF of photos over 8 MP and 4 GB over 24 MP; 4 GB for a KB target (maxKb, up to 9 encodes) or lossless WebP of photos, and for 67 MP photos (182 s at 2 GB); or raisetimeoutSecs. Grainy or noisy images take 2–4 times longer. An image that runs out of time is free. - Conversion uses one process per full CPU core of the run (at least one), and the memory limits above are shared by those processes. Give the run more memory for big batches of large images.
Use it from your stack
You need an Apify account and token. No third-party API keys are needed.
- API:
curl -X POST "https://api.apify.com/v2/acts/klarto~image-converter/run-sync-get-dataset-items?token=$APIFY_TOKEN" \-H 'Content-Type: application/json' -d '{"images":["https://images-assets.nasa.gov/image/as11-37-5505/as11-37-5505~small.jpg"],"format":"avif"}'
- Python (
apify-client3.x):from apify_client import ApifyClientclient = ApifyClient("<APIFY_TOKEN>")run = client.actor("klarto/image-converter").call(run_input={"images": ["https://images-assets.nasa.gov/image/as11-37-5505/as11-37-5505~small.jpg"], "maxWidth": 800})print(client.dataset(run.default_dataset_id).list_items().items) - n8n: the Apify node, Run an Actor with
klarto/image-converter, then Get dataset items. - Make / Zapier: the Apify app with the same Actor.
- MCP / AI agents:
https://mcp.apify.com?tools=klarto/image-converter.
FAQ
WebP or AVIF? WebP works in all modern browsers and encodes fast. AVIF is usually smaller at the same quality but 2.5–3 times slower to encode (see Limits for the memory to give it) and not shown by some older software.
Can it convert HEIC photos from iPhones? No. HEIC is not supported; export the photos as JPEG first.
Is GPS removed? Yes by default (stripMetadata): EXIF, XMP and JPEG comments are not written to the output. Turn it off to keep EXIF (the orientation is set to upright).
Why do PNG and lossless WebP cost more? Lossless encoding takes several times the CPU of WebP, AVIF or JPEG, so each lossless file pays $0.0025 per started 4 megapixels on top of the image price. For photos use WebP or AVIF; PNG and lossless WebP suit logos, screenshots and graphics, which are small. AVIF output is always lossy here (the lossless option applies to WebP only), so it never pays lossless blocks.
Why is the output bigger than the source? An already well-compressed file, or PNG or lossless output, can grow. savedPercent shows it as a negative number; try WebP or a lower quality.
Can I download everything at once? Yes: zipUrl in the OUTPUT record downloads all converted files as one ZIP.
Are private links supported? Only links that anyone can open and that return the image file itself, not a web page around it.
Fair use and licences
- Convert only images you own or may process.
- Libraries: Pillow (MIT-CMU) with libwebp (BSD-3-Clause), libavif (BSD-2-Clause), libjpeg-turbo (IJG/BSD) and zlib; httpx (BSD-3-Clause); Apify SDK (Apache-2.0).
Ready-made examples
Saved inputs for common jobs: open one and run it as it is, or change the input first.
- Convert images to WebP and compress them
- Make responsive image sizes (srcset) in AVIF
- Compress images to under 100 KB in bulk
- Resize images in bulk to a maximum width
Related Actors
- Bulk File Downloader: download the originals first, then convert the
fileUrlfield. - Image Upscaler: enlarge small images 4×.
- Website Screenshot & HTML to Image / PDF: capture pages as PNG or JPEG.
Support
Open an issue on the Actor page. We aim to answer within a week.