# Image Converter — JPEG, PNG and WebP With Resize and Quality (`hermeskd/image-format-converter`) Actor

Image converter: Static JPEG, PNG and WebP conversion with bounded resizing. $0.002 per XS source (up to 500 KB); $0.003 per S source (over 500 KB to 2 MB); $0.015 per M source (over 2 MB to 10 MB); start extra; usage included; failed results uncharged.

- **URL**: https://apify.com/hermeskd/image-format-converter.md
- **Developed by:** [Logan Parker](https://apify.com/hermeskd) (community)
- **Categories:** Developer tools, Automation, Agents
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.60 / 1,000 image converted (xs)s

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-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

Image converter for static JPEG, PNG and WebP: resize without upscaling, choose an output format and set JPEG or WebP encoding quality; source-byte bands determine the result event. AI agents can call and pay through Apify MCP. List event rates are $0.002 per XS source (up to 500 KB); $0.003 per S source (over 500 KB to 2 MB); $0.015 per M source (over 2 MB to 10 MB); start is extra, usage is included and failed results are uncharged.

### Example result

Example record for the minimal input under How to use it, as this Actor returned it on 2026-10-28 in a run of its production image; the record is kept unchanged with the release.

```json
{
  "url": "https://raw.githubusercontent.com/python-pillow/Pillow/262e8e48229197ef08792de41a6bdd94e42219a0/Tests/images/test-card.png",
  "ok": true,
  "format": "webp",
  "width": 640,
  "height": 480,
  "bytes": 11310,
  "fileUrl": "file:///storage/key_value_stores/default/e6d2ef6d73d5e5ba29acdc2ddb353db4d9204f47da762b5aafb08f390bd968ad.webp"
}
```

### How to use it

Start a run in Apify Console, by API or from an agent with an input like this one — it is the input Apify runs every day to test this Actor:

```json
{"urls": ["https://raw.githubusercontent.com/python-pillow/Pillow/262e8e48229197ef08792de41a6bdd94e42219a0/Tests/images/test-card.png"]}
```

Start with the minimal JSON example above, then adjust the fields in the table below. Read the Example result and Output fields sections for the returned record, Errors for failure codes, and Events and prices for result events and the separate platform start.

| Field | Type | Meaning |
|---|---|---|
| `urls` | array | 1–100 URLs; PNG, JPEG and static WebP inputs only, at most 10 MB; 5 megapixels at 256 or 512 MB, 16 megapixels at 1024 or 2048 MB. A verified allocation of at least 256 MB is required. Animation refused; orientation applied, ancillary metadata dropped; no C2PA-bearing input accepted. JPEG alpha is composited on white. |
| `outputFormat` | string | Encoded output format. |
| `maxDimension` | integer | Fit within this box without enlarging the image. |
| `quality` | integer | JPEG and WebP encoder quality; PNG is lossless. |

### Events and prices

Each successful image earns exactly one event according to the **original fetched source bytes**, before resizing, conversion or metadata removal. KB means 1,000 bytes; MB means 1,000,000 bytes. Output file size does not set the band.

| Event | Title | Charged when | FREE / BRONZE | SILVER | GOLD / PLATINUM / DIAMOND |
|---|---|---|---|---|---|
| `image-converted` | Image Converted (XS) | One readable converted image from an original fetched source of at most 500,000 bytes. | $0.002 | $0.0018 | $0.0016 |
| `image-converted-s` | Image Converted (S) | One readable converted image from an original fetched source of more than 500,000 and at most 2,000,000 bytes. | $0.003 | $0.0027 | $0.0024 |
| `image-converted-m` | Image Converted (M) | One readable converted image from an original fetched source of more than 2,000,000 and at most 10,000,000 bytes. | $0.015 | $0.0135 | $0.012 |

XS and S match the compared leader's source-band prices; M is priced higher. Sources over 10 MB remain unsupported and earn no result event. These are the complete custom result prices; no byte, compute, output-file or settlement fee is added. Platform usage is not passed through. Apify's automatic actor-start event remains $0.00005 per started GB (one GB or less counts once), including on a failed run. The synthetic dataset-item event is absent.

At list, one XS image costs $0.00205, one S image $0.00305, and one M image $0.01505 including a single start event at allocations up to 1024 MB. At 2048 MB the start is $0.0001, so one M image costs $0.0151. Ten XS images cost $0.02 plus actor start. Set the charge budget for the selected band and start event; the worked call below uses one XS source. A remaining budget insufficient for the actual source band stops processing before encoding/file storage, with an uncharged error. Failed images earn no conversion event. Completed readable pending events are settled on abort.

### Call it from an agent

Through Apify's MCP server (https://mcp.apify.com) use `call-actor`:

```json
{
  "actor": "hermeskd/image-format-converter",
  "input": {
    "urls": [
      "https://raw.githubusercontent.com/python-pillow/Pillow/262e8e48229197ef08792de41a6bdd94e42219a0/Tests/images/test-card.png"
    ]
  },
  "callOptions": {
    "maxTotalChargeUsd": 0.01,
    "timeout": 600
  },
  "waitSecs": 30
}
```

Then call `get-dataset-items` with the returned defaultDatasetId. Dedicated tool URL: https://mcp.apify.com?tools=hermeskd/image-format-converter

### Output fields

| Field | Meaning |
|---|---|
| `url` | The caller supplied input, carried unchanged. |
| `ok` | True for a returned result; a failure is never charged. |
| `format` | Output format. |
| `width` | Output width in pixels. |
| `height` | Output height in pixels. |
| `bytes` | Encoded output bytes. |
| `fileUrl` | Readable Apify key-value file URL for the result. |
| `error` | Failure, always uncharged. |

### Limits and run time

The deploy measures the actual pricing floor separately for XS, S and M before release. The resource policy preserves every supported format and quality setting: choose 1024 MB or 2048 MB for inputs above 5 megapixels. Allocation is never raised automatically; an insufficient or unverified allocation is refused without a result charge. Prior CPU-share measurements and the retained 512 MB WebP100 failure remain archived.

Complete serialized results must fit an 8 MB delivery budget, including input identity and JSON escaping. Oversized results are refused without a result charge. Invalid Unicode in failure echoes is escaped. Failure input echoes longer than 8,192 characters are shortened; blank list entries refuse the whole input without silently dropping entries.

1–100 URLs; PNG, JPEG and static WebP inputs only, at most 10 MB; 5 megapixels at 256 or 512 MB, 16 megapixels at 1024 or 2048 MB. A verified allocation of at least 256 MB is required. Animation refused; orientation applied, ancillary metadata dropped; no C2PA-bearing input accepted. JPEG alpha is composited on white.

The default run timeout is 600 seconds. Local production-image smoke on 2026-10-28: 4.71 seconds at 256 MB and one CPU (the smallest configured memory). Platform cold start, billing and pricing-floor verification remain deploy gates.

### Errors

| Code | Meaning |
|---|---|
| `http_error` | The source answered an unsuccessful HTTP status. |
| `download_failed` | The request or connection failed within its bounded deadline. |
| `unsupported_image` | The input is not a supported static image or is damaged. |
| `image_too_large` | Source size, decoded pixels or available memory exceeds the supported resource envelope; unverified allocation is refused without a charge. |
| `content_credentials_present` | Content credentials are present; conversion would invalidate them and is refused. |
| `robots_disallowed` | robots.txt forbids fetching the URL; no request was made to it. |
| `blocked_host` | The host is on the deny-list or resolves to a private or local address; no request was made. |
| `too_large` | The response exceeded the size cap. |
| `timeout` | The input did not finish within the run's time budget. |
| `invalid_input` | The run input passed the input schema but cannot be used; the message names the field. |
| `internal_error` | Unexpected failure; the message carries the error class. |
| `charge_limit_reached` | The run reached its maximum total charge; this input was not processed. |

No failure record is charged. A run fails only when all input outcomes are Actor-side failures; caller errors and a mixture of caller/Actor failures do not fail the run.

### Sources and terms

Only process content you have the right to process. URL fetches obey HermesBot robots-group selection, the shared deny-list, public-address checks on connections and redirects, honest identity, deadlines and rate limits. No caller credentials, cookies, CAPTCHA solving, residential proxies or evasion. Caller-named images under the shared fetch policy; Pillow at 12.3.0, MIT-CMU licence. The pinned Pillow test-card input uses its permissive project licence. No face identification or metadata extraction. The M-band deploy benchmark uses NASA 3D Resources Apollo Crater imagery, stated free and without copyright by the repository, with NASA credited and no endorsement implied.

### Not affiliated

This Actor is not affiliated with the source providers named here. Process only content you have the right to process.

### Related Hermes Actors

- [AI Crawler Checker: Which AI Bots robots.txt Allows per URL](https://apify.com/hermeskd/ai-crawler-access-check) — check declared robots.txt permissions for six AI crawlers at URL paths.
- [Article Extractor — News & Blog Text, Date and Markdown by URL](https://apify.com/hermeskd/article-extractor) — an article's clean text, title and publish date, without the rest of the page.
- [100K+ indexed jobs — Career Site Jobs API | 2026-11-03](https://apify.com/hermeskd/ats-job-search) — search open jobs in the Hermes directory of Greenhouse and Lever boards, each confirmed live.
- [Speech to Text — Transcribe Audio & Video URLs, Speaker Labels](https://apify.com/hermeskd/audio-to-transcript) — speech to text with SRT and VTT subtitles.
- [Video Converter — MP4 to MP3, Trim, GIF and Audio Extraction](https://apify.com/hermeskd/audio-video-convert) — audio and video conversion: MP4 to MP3, trim, GIF.
- [Broken Links Checker — Links, Assets, Redirects and Their Pages](https://apify.com/hermeskd/broken-links) — broken links, 404s and redirects on a site.
- [100K+ indexed jobs — Company ATS Finder API | 2026-11-03](https://apify.com/hermeskd/company-ats-board) — which hiring system and job board a company uses.
- [SEC EDGAR Filings — Recent Company Forms, Dates and XBRL Flags](https://apify.com/hermeskd/company-filing-index) — Read recent company financial filing metadata from the official SEC JSON API
- [DOI Lookup — Crossref Titles, Venues, Dates and Citation Counts](https://apify.com/hermeskd/crossref-doi-metadata) — crossref doi metadata.
- [CVE Vulnerability Lookup — NVD CVSS Scores and Exploited Flags](https://apify.com/hermeskd/cve-risk-metrics) — look up NVD CVE dates, status, numeric CVSS scores and severity.
- [Merge JSON Datasets — Deduplicate Rows, Export JSON and CSV](https://apify.com/hermeskd/dataset-json-cleaner) — json dataset cleaner.
- [DNS Lookup — Records, SPF Lookup Counts, DKIM & DMARC by Domain](https://apify.com/hermeskd/dns-and-email-auth) — DNS records and SPF, DKIM and DMARC checks.
- [DOCX to Markdown — Word, Excel, PowerPoint and EPUB Converter](https://apify.com/hermeskd/document-to-markdown) — Word, Excel, PowerPoint and other office files to Markdown.
- [Domain Availability Checker — Bulk RDAP Status and Registrar](https://apify.com/hermeskd/domain-availability) — whether domain names are available, from registry RDAP.
- [USGS Earthquake Lookup — Event Magnitude, Depth, Coordinates](https://apify.com/hermeskd/earthquake-event-metrics) — Read numeric USGS earthquake metadata for known event identifiers.
- [Currency Exchange Rates — ECB Daily Euro Rates and Cross Pairs](https://apify.com/hermeskd/ecb-exchange-rates) — Read latest ECB daily currency reference rates and calculated cross pairs.
- [Bulk File Downloader — Save URL Lists to Storage With SHA-256](https://apify.com/hermeskd/file-downloader) — files and images from URLs, saved with a public link each.
- [GitHub Repo Stats — Stars, Forks, Subscribers and Open Issues](https://apify.com/hermeskd/github-repository-metrics) — Read numeric metrics for known public GitHub repositories.
- [47K+ Greenhouse jobs — Live API | 2026-11-03](https://apify.com/hermeskd/greenhouse-jobs) — every open job on a company's Greenhouse board.
- [Hacker News Story Metrics — Scores, Comment Counts, Timestamps](https://apify.com/hermeskd/hacker-news-story-metrics) — read numeric Hacker News story scores, timestamps and comment counts by ID.
- [HTTP GET Request — Bulk Response Bodies, Status and SHA-256](https://apify.com/hermeskd/http-get-response) — public http get.
- [Security Headers Checker — HSTS, CSP, Framing, Nosniff by URL](https://apify.com/hermeskd/http-security-headers) — Check seven declared HTTP security header families without returning raw values.
- [Image Background Remover — U2NetP Cutouts for JPEG, PNG, WebP](https://apify.com/hermeskd/image-background-remover) — Remove image backgrounds with the small U2NetP model and return transparent PNG pixels as base64
- [Image Metadata Remover — EXIF and GPS Scrub, Pixels Verified](https://apify.com/hermeskd/image-metadata-remover) — GPS location, camera serial numbers and other private metadata removed from photos, losslessly.
- [Image to Text OCR — Text With Word Positions and Confidence](https://apify.com/hermeskd/image-to-text) — OCR: the text in images.
- [Image Upscaler — Real-ESRGAN 2x/4x for Photos and Graphics](https://apify.com/hermeskd/image-upscale) — image upscaling 2x or 4x, and photo restoration.
- [25K+ Lever jobs — Live API | 2026-11-03](https://apify.com/hermeskd/lever-jobs) — every published job on a company's Lever site, global or EU.
- [Lighthouse Audit — Lab Web Vitals and Scores, Mobile & Desktop](https://apify.com/hermeskd/lighthouse-audit) — Lighthouse scores and Core Web Vitals.
- [npm Package Lookup — Latest Version, License, Dependency Count](https://apify.com/hermeskd/npm-package-metadata) — read latest npm package versions, license tokens and dependency counts.
- [Website Change Monitor — Page Text Diffs Against Your Snapshots](https://apify.com/hermeskd/page-change-monitor) — what changed on a page since the last check.
- [PDF to Markdown — PDF Parser & Text Extractor With OCR](https://apify.com/hermeskd/pdf-to-markdown) — PDF to Markdown and text, with OCR for scanned pages.
- [Public Holidays Calendar — Holiday Dates for Five Countries](https://apify.com/hermeskd/public-holiday-calendar) — build offline public-holiday calendars for five countries and bounded years.
- [99 Remote OK jobs — Remote OK Feed API | 2026-11-02](https://apify.com/hermeskd/remote-jobs) — current remote jobs from Remote OK, with salary and listing links.
- [Research Paper Search — OpenAlex Papers, DOIs, Citation Counts](https://apify.com/hermeskd/research-paper-search) — Search OpenAlex for work-level paper metadata without authors, affiliations, abstracts or full text
- [RSS Feed Reader — Atom and JSON Feed Parser With Enclosures](https://apify.com/hermeskd/rss-feed-reader) — every item of an RSS, Atom or JSON feed.
- [SEO Audit — On-Page Score, Meta Tags, Schema & Fix Guidance](https://apify.com/hermeskd/seo-page-audit) — an on-page SEO audit: meta tags, schema, headings and links.
- [Sitemap Extractor — Unique URLs From XML, Gzip & Index Sitemaps](https://apify.com/hermeskd/sitemap-urls) — the URLs in a site's sitemaps.
- [Text to Speech — Offline English, German, Spanish WAV Voices](https://apify.com/hermeskd/text-to-speech) — Convert short nonpersonal texts to offline formant WAV speech for agents
- [Time Zone Converter API](https://apify.com/hermeskd/timezone-converter) — Convert one offset-qualified instant to named IANA time zones using pinned data.
- [URL to Markdown — Clean Text for LLM & RAG, With Selectors](https://apify.com/hermeskd/url-to-markdown) — a public job page as clean Markdown where the site allows it (deny-listed job sites are refused).
- [Extract Video Frames — Timed Stills by Interval or Scene Cut](https://apify.com/hermeskd/video-frames) — frames, thumbnails and scenes from a video.
- [Website Color Palette — CSS Colors With Alpha and Usage Counts](https://apify.com/hermeskd/website-color-palette) — Extract declared website CSS color literals and counts from public HTML and bounded linked stylesheets
- [Favicon Extractor — Icons, Touch Icons, Manifests, Theme Color](https://apify.com/hermeskd/website-icon-manifest) — declared website icons, theme colors and manifest links.
- [Website Screenshot — Full Pages, Elements, Dark Mode & PDF](https://apify.com/hermeskd/website-screenshot) — screenshots and PDF prints of web pages.
- [Tech Stack Detector — Website Technologies With Match Evidence](https://apify.com/hermeskd/website-tech-stack) — the technologies a website runs, detected live.
- [Website Crawler to Markdown — Same-Site Pages for LLM and RAG](https://apify.com/hermeskd/website-to-markdown) — bounded whole-site Markdown with robots and crawl-delay enforced

### Changelog

- 1.0 (2026-10-28) — Initial implementation, main-path fixtures and local production-image examples verified; publication awaits the scheduled merge.

# Actor input Schema

## `urls` (type: `array`):

1–100 URLs; PNG, JPEG and static WebP inputs only, at most 10 MB and 5 MP at 256 or 512 MB, or 16 MP at 1024 or 2048 MB; a verified allocation of at least 256 MB is required. Animation refused; orientation applied, ancillary metadata dropped; no C2PA-bearing input accepted. JPEG alpha is composited on white.

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

Encoded output format. Accepted values: webp, png, jpeg.

## `maxDimension` (type: `integer`):

Fit within this box without enlarging the image. Accepted range: 64–4096, inclusive.

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

JPEG and WebP encoder quality; PNG is lossless. Accepted range: 1–100, inclusive.

## Actor input object example

```json
{
  "urls": [
    "https://raw.githubusercontent.com/python-pillow/Pillow/262e8e48229197ef08792de41a6bdd94e42219a0/Tests/images/test-card.png"
  ],
  "outputFormat": "webp",
  "maxDimension": 1600,
  "quality": 85
}
```

# Actor output Schema

## `results` (type: `string`):

No description

## `files` (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 = {
    "urls": [
        "https://raw.githubusercontent.com/python-pillow/Pillow/262e8e48229197ef08792de41a6bdd94e42219a0/Tests/images/test-card.png"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("hermeskd/image-format-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 = { "urls": ["https://raw.githubusercontent.com/python-pillow/Pillow/262e8e48229197ef08792de41a6bdd94e42219a0/Tests/images/test-card.png"] }

# Run the Actor and wait for it to finish
run = client.actor("hermeskd/image-format-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 '{
  "urls": [
    "https://raw.githubusercontent.com/python-pillow/Pillow/262e8e48229197ef08792de41a6bdd94e42219a0/Tests/images/test-card.png"
  ]
}' |
apify call hermeskd/image-format-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,hermeskd/image-format-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/pgxbWWD81UkM0QpdY/builds/itlPtwDq705csFRkm/openapi.json
