# Batch Image Converter — $1/1K · HEIC, WebP, AVIF & JPG (`apivault_labs/batch-image-converter`) Actor

Convert images and ZIP batches to JPG, PNG, WebP, AVIF, TIFF or BMP. HEIC input, resize, compression, EXIF/GPS removal, verified files and ZIP with size report. Local processing; no external API key.

- **URL**: https://apify.com/apivault_labs/batch-image-converter.md
- **Developed by:** [Apivault Labs](https://apify.com/apivault_labs) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.00 / 1,000 converted image delivereds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

Learn more: https://docs.apify.com/actors/store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Batch Image Converter — HEIC, WebP, AVIF, JPG & PNG

Turn a folder of mixed image formats into a consistent set of files. Convert iPhone HEIC photos to JPEG, prepare WebP or AVIF images for a website, export PNG assets, or resize a product catalog. Supply image URLs, upload images, or upload ZIP archives. Get one verified file per successful image, a combined ZIP, a JSON manifest and a CSV size report.

Conversion runs locally inside the Apify container. No external conversion account, API key or AI service is required. Downloading URL inputs contacts their source servers; converted files are stored in your Apify run. This is format conversion and optional downscaling. It does not restore details or perform AI upscaling.

### Quick start

The prefilled example uses our own synthetic image. Choose an output format and click Start. Open **Output** for the ZIP, report and errors, or **Dataset** for individual download links.

```json
{
  "imageUrls": ["https://api.apify.com/v2/key-value-stores/AfEDj4rwFGHoGFhnK/records/sample.png?signature=1ONiUSQFyLZTgQCHXjqB0"],
  "outputFormat": "webp",
  "quality": 85,
  "maxWidth": 1200,
  "stripMetadata": true
}
```

For uploads, use **Upload images or ZIP files** (`files`). Both input lists can be combined. Duplicate URL strings are processed once. Identical bytes at different URLs remain separate inputs. Files are named with an index so repeated source filenames cannot overwrite each other.

### Supported conversions

| Input | Output choices | Notes |
|---|---|---|
| HEIC / HEIF | JPEG, PNG, WebP, AVIF, TIFF, BMP | Input-only HEIC; decoded to 8-bit, HDR is not preserved |
| JPEG, PNG, WebP, AVIF | All six output formats | Transparency preserved by PNG, WebP, AVIF and TIFF |
| TIFF, BMP | All six output formats | High-bit-depth/scientific TIFF modes are rejected |
| GIF or other multi-frame supported formats | A single output image | Rejected by default; explicitly select `multiFrame: "first"` to export only the first frame/page |
| ZIP of supported images | A converted batch | Nested folders accepted, directory layout flattened; unsafe/encrypted archives rejected |

SVG, PDF, camera RAW, PSD, animated output and HEIC output are not supported. ZIP files are read directly without extracting their paths. Non-image members are ignored, but count toward archive size limits. Invalid images become free errors rather than placeholder results.

### Common workflows

#### HEIC to JPG for forms, listings and older software

Upload HEIC images through `files` and set `outputFormat: "jpg"`. EXIF orientation is applied before metadata is removed. HEIC sequences require the explicit first-frame policy. HEIF/HDR data is decoded to 8-bit; no claim of HDR fidelity or calibrated tone mapping is made.

#### Compress a web catalog to WebP or AVIF

```json
{
  "imageUrls": ["https://api.apify.com/v2/key-value-stores/AfEDj4rwFGHoGFhnK/records/sample.png?signature=1ONiUSQFyLZTgQCHXjqB0"],
  "outputFormat": "avif",
  "quality": 75,
  "maxWidth": 1600,
  "maxHeight": 1600
}
```

`quality` controls JPEG, WebP and AVIF encoders. It is ignored for PNG, TIFF and BMP. A smaller file is not guaranteed: converting an already compressed JPEG to PNG can increase size. `bytesSaved` and `savingsPercent` may be negative; the report records actual output sizes.

#### Replace PNG transparency with a chosen background

```json
{
  "imageUrls": ["https://api.apify.com/v2/key-value-stores/AfEDj4rwFGHoGFhnK/records/sample.png?signature=1ONiUSQFyLZTgQCHXjqB0"],
  "outputFormat": "jpg",
  "background": "#FFFFFF",
  "quality": 90
}
```

JPEG and BMP outputs use the selected background for transparent pixels. PNG, WebP, AVIF and TIFF retain alpha. JPEG is lossy, including at quality 100; converting a JPEG back to PNG cannot recover discarded information.

#### Resize without stretching

`maxWidth` and `maxHeight` define a bounding box after orientation is applied. Aspect ratio is retained. A value of 0 means no bound on that axis beyond the source size. Images are never enlarged, cropped or padded. Lanczos downscaling changes pixels; it is not AI enhancement.

### Downloads and reports

| Output | Contents |
|---|---|
| Dataset | One row per successfully converted and stored image, with individual and ZIP download links |
| `BATCH.zip` | Converted files, `manifest.json` and `report.csv`; no extra conversion event |
| `MANIFEST` | JSON list of converted image metadata and individual result links |
| `REPORT.csv` | Source/output format, dimensions, byte sizes, savings, metadata status and hashes |
| `SUMMARY` | Delivered count, attempted count, sizes, budget status, errors and download links |
| `ERRORS` | Stable error codes and input indexes, with no billed error rows |

Each Dataset row includes `inputIndex`, `sourceIndex`, `sourceFilename`, `filename`, `resultUrl`, `zipUrl`, `sourceFormat`, `outputFormat`, source/oriented/output dimensions, `originalBytes`, `outputBytes`, `bytesSaved`, `savingsPercent`, `sha256`, `metadataStripped`, `alphaFlattened`, `sourceFrames` and `warnings`.

Files are decoded after encoding, stored in the run's key-value store and read back before delivery. Their SHA-256 hashes describe output bytes. JSON/CSV can also be exported with normal Apify Dataset tools. Download links use Apify's storage access mechanism; treat links and ZIPs as sensitive. Retention follows your Apify storage settings. Run input still contains your original uploaded-file links/URLs.

### Metadata and colors

`stripMetadata: true` is the privacy default. It removes copied EXIF/GPS, comments and XMP blocks; image structure and color-profile information are not personal metadata. EXIF orientation is applied first. An embedded ICC profile is converted to sRGB where supported; invalid or unsupported profiles produce an explicit error.

Setting `stripMetadata: false` preserves supported EXIF in JPG, PNG, WebP and AVIF, including GPS when supplied by the source. Orientation and stale dimension tags are removed after transformation. This is not a byte-for-byte metadata archive: arbitrary text/XMP blocks and format-specific tags are not promised. TIFF and BMP require `stripMetadata: true`; incompatible settings are rejected before downloading sources. Review results before distributing sensitive photographs.

### Limits and partial results

- Up to 100 image attempts per run; `maxImages` can lower the cap. Invalid decoded images count toward attempts but not result fees. ZIPs exceeding the remaining image/budget cap are rejected as a whole rather than silently truncated.
- Up to 20 MB per image, 25 megapixels, 50 MB per downloaded ZIP, 200 MB downloaded source bytes per batch and 200 MB total converted images. ZIP uncompressed content is capped at 200 MB, each member at 20 MB; at most 500 archive entries. Nested ZIPs are not expanded. Extreme compression ratios are rejected.
- Source collection/processing budget is 240 seconds, with bounded network timeouts and up to five redirects. CPU encoding and final storage are also bounded by the platform run timeout; large AVIF batches can require smaller `maxImages`. Use 1,024 MB memory or more.
- Public HTTP(S) sources only. Private/local/reserved addresses, URL credentials and nonstandard ports are blocked. Source DNS addresses are validated and pinned for each redirect hop; TLS verification stays enabled. Authenticated websites and signed links that expire before processing may fail.
- Valid images can remain downloadable when another image fails. Mixed batches finish with a failed platform status and `SUMMARY.status: "PARTIAL"`; inspect Dataset and ERRORS before retrying. Successful delivered images remain billable. A storage/delivery failure can leave artifacts without a completed Dataset receipt: reconcile the run before retrying. Exactly-once delivery across interrupted runs is not guaranteed.

### Price

**$1 per 1,000 delivered images ($0.001/image)**, plus the Apify start event and platform/storage usage. Confirm the actor's current Pricing tab before running. One successful image creates one Dataset result event. Errors, ZIP download, CSV and JSON reports have no extra result event. Start/platform usage can still apply to empty or failed runs.

Set Apify's maximum total charge before a batch. The Actor checks how many result events fit before conversion. If no result fits, it stops before fetching sources. Budget checks limit result events, not all resource/storage costs. CPU AVIF conversion and large image batches can cost more in resources than a small JPEG batch.

### API, automation and integrations

Use the Actor's Apify API tab to copy the exact run endpoint, token handling and input JSON. An API call uses the same `imageUrls`/`files` arrays and conversion settings as the form. n8n's generic HTTP Request node can start this Actor and fetch its run Dataset or output records. This product does not yet have a dedicated verified n8n node, npm package, Python client or separate MCP integration; existing upscaler clients are not claimed to support this converter.

### FAQ

**Does it improve blurry photos?** No. Format conversion does not add source detail. Use an image upscaler as a separate step when enlargement is needed.

**Can it process iPhone images?** HEIC/HEIF input is supported. Standard still photos are the intended use; HDR fidelity and Live Photo video are not preserved.

**Are files sent to an AI provider?** No. Conversion runs inside the Apify container. Source downloads and Apify storage are the only required network paths.

**Can it preserve an animation or every TIFF page?** No. Keep the default rejection policy, or explicitly select first-frame export and inspect its warning.

**Why is the converted file larger?** Some formats and quality levels require more bytes. The report records actual savings rather than promising compression for every image.

**Does the ZIP replace individual files?** Both are provided. ZIP/report generation does not add another per-image event.

**How can I find the failed file?** Match `sourceIndex` and `inputIndex` in ERRORS to your input and the Dataset. Raw source URLs and network exception details are not copied into error records.

# Changelog

This Actor's version history is a separate document: https://apify.com/apivault_labs/batch-image-converter/changelog.md

# Actor input Schema

## `imageUrls` (type: `array`):

Public HTTP(S) URLs of images or ZIP archives. Duplicate URLs are processed once.

## `files` (type: `array`):

Upload files directly. Images up to 20 MB; ZIP up to 50 MB. Combined batch: at most 100 images.

## `outputFormat` (type: `string`):

Output format. JPEG and BMP replace transparency with the chosen background. HEIC is input-only.

## `quality` (type: `integer`):

JPEG, WebP and AVIF encoder quality, 1–100. Ignored for PNG, TIFF and BMP. Smaller files are not guaranteed.

## `maxWidth` (type: `integer`):

Pixels; 0 keeps source width as upper bound. Fits inside width/height, keeps aspect ratio, never enlarges.

## `maxHeight` (type: `integer`):

Pixels; 0 keeps source height as upper bound. Dimensions apply after EXIF rotation.

## `background` (type: `string`):

Hex color #RRGGBB used where transparent pixels become opaque.

## `stripMetadata` (type: `boolean`):

On by default. Apply orientation, then remove EXIF/GPS. Off preserves supported EXIF including GPS only in JPG/PNG/WebP/AVIF; TIFF/BMP require On. ICC colors are converted to sRGB. Text/XMP blocks are not copied.

## `multiFrame` (type: `string`):

Default rejects animations and multi-page TIFF/HEIC. First exports only frame/page 1 and records a warning; animation is not preserved.

## `maxImages` (type: `integer`):

Global image cap across URLs, uploads and ZIP entries. ZIPs exceeding the remaining cap are rejected as a whole. Invalid decoded images count toward attempts but produce no paid result.

## Actor input object example

```json
{
  "imageUrls": [
    "https://api.apify.com/v2/key-value-stores/AfEDj4rwFGHoGFhnK/records/sample.png?signature=1ONiUSQFyLZTgQCHXjqB0"
  ],
  "outputFormat": "webp",
  "quality": 85,
  "maxWidth": 0,
  "maxHeight": 0,
  "background": "#FFFFFF",
  "stripMetadata": true,
  "multiFrame": "reject",
  "maxImages": 100
}
```

# Actor output Schema

## `zip` (type: `string`):

No description

## `manifest` (type: `string`):

No description

## `report` (type: `string`):

No description

## `summary` (type: `string`):

No description

## `errors` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "imageUrls": [
        "https://api.apify.com/v2/key-value-stores/AfEDj4rwFGHoGFhnK/records/sample.png?signature=1ONiUSQFyLZTgQCHXjqB0"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("apivault_labs/batch-image-converter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "imageUrls": ["https://api.apify.com/v2/key-value-stores/AfEDj4rwFGHoGFhnK/records/sample.png?signature=1ONiUSQFyLZTgQCHXjqB0"] }

# Run the Actor and wait for it to finish
run = client.actor("apivault_labs/batch-image-converter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "imageUrls": [
    "https://api.apify.com/v2/key-value-stores/AfEDj4rwFGHoGFhnK/records/sample.png?signature=1ONiUSQFyLZTgQCHXjqB0"
  ]
}' |
apify call apivault_labs/batch-image-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,apivault_labs/batch-image-converter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/YaCdm6AhCtqNIRUxS/builds/MQ23O7qPqBjen7B16/openapi.json
