Image Optimizer & Converter: Website Images to WebP, AVIF avatar

Image Optimizer & Converter: Website Images to WebP, AVIF

Pricing

from $2.00 / 1,000 image converteds

Go to Apify Store
Image Optimizer & Converter: Website Images to WebP, AVIF

Image Optimizer & Converter: Website Images to WebP, AVIF

Compress and convert images to WebP, AVIF, JPEG, PNG or GIF: from URLs, every image a web page shows, or a scraper's dataset. Under a target size in KB, fitted, cropped or padded to an exact size, EXIF and GPS removed, HEIC read, a ZIP of all. Failures are free.

Pricing

from $2.00 / 1,000 image converteds

Rating

0.0

(0)

Developer

Spyridon Pikoulas

Spyridon Pikoulas

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

2 days ago

Last modified

Features

Limited permissions

Share

Give it images, the web pages that show them, or a scraper's dataset, and get each image back converted, resized and compressed:

  • From anywhere: image URLs; every image a web page shows (the largest of each srcset, lazy-loaded ones and the social preview image), with its alt text; or the image URLs in your Apify datasets, from any scraper.
  • Into WebP, AVIF, JPEG, PNG or GIF, or the same format, smaller. From JPEG, PNG, WebP, AVIF, HEIC (iPhone photos), GIF, TIFF or BMP, up to 50 MB and 100 megapixels each.
  • Under a target file size, such as 100 KB: the highest quality that fits, and a smaller image if even the lowest doesn't.
  • Resized to fit inside a width and height, or to an exact size: cover crops the overflow, pad keeps the whole image on a background colour, as shops want square product photos.
  • Animations stay animated from GIF, WebP, PNG or AVIF into WebP, AVIF, PNG or GIF.
  • EXIF and GPS removed, the photo turned upright first. The colour profile is kept.
  • A link to each file, its size before and after and what was saved, the page it was on, and all files in one ZIP if you want. The run's status says what the whole set weighed before and after.

It costs $2 per 1,000 images on Apify's paid plans and $3 on the free plan. An image that can't be fetched or read costs nothing.

What people use it for

  • Faster websites: give your pages and get their images as WebP or AVIF at the width they're shown, with how much lighter they get, for Core Web Vitals and PageSpeed.
  • E-commerce and marketplaces: product photos at the exact size and under the file size a marketplace asks for, padded on white.
  • After a scraper: pick its dataset, and the images it found come out converted, ready for your site or feed.
  • iPhone photos: HEIC into JPEG or WebP that every browser and tool opens.
  • Privacy: photos without their GPS position and camera details before they're published.
  • Automation: image conversion as one step of a Make, Zapier or n8n workflow.

How to convert images

  1. Click Try for free; Apify's free plan covers a first run.
  2. Enter Image URLs, Web pages or Apify datasets, or a mix.
  3. Pick the format under Convert to, and a Max file size, Width or Height if you want them smaller.
  4. Click Start, then open the files from the Output tab, or download the dataset as JSON, CSV or Excel.

An input with every option:

{
"urls": [
"https://api.apify.com/v2/key-value-stores/QOCeroT733vQ3tPPv/records/sample-photo.jpg",
"https://api.apify.com/v2/key-value-stores/QOCeroT733vQ3tPPv/records/sample-photo.heic"
],
"pageUrls": ["https://www.example.com/blog/"],
"maxImagesPerPage": 100,
"datasetIds": ["YOUR_DATASET_ID"],
"urlFields": ["imageUrl"],
"format": "webp",
"quality": 80,
"maxKilobytes": 150,
"maxWidth": 1600,
"maxHeight": 1600,
"fit": "inside",
"minSide": 50,
"background": "#ffffff",
"zip": true
}

For a shop's square product photos under 100 KB:

{
"datasetIds": ["YOUR_DATASET_ID"],
"format": "jpeg",
"maxKilobytes": 100,
"maxWidth": 1000,
"maxHeight": 1000,
"fit": "pad",
"background": "#ffffff"
}

Output

{
"url": "https://api.apify.com/v2/key-value-stores/QOCeroT733vQ3tPPv/records/sample-photo.jpg",
"foundOn": null,
"alt": null,
"finalUrl": "https://api.apify.com/v2/key-value-stores/QOCeroT733vQ3tPPv/records/sample-photo.jpg",
"fileName": "sample-photo.jpg",
"imageUrl": "https://api.apify.com/v2/key-value-stores/ZGJnCDiBab3DLzD5M/records/00000-sample-photo.webp?signature=13PIcFjmSe6VApfnVxQeN",
"key": "00000-sample-photo.webp",
"originalFormat": "JPEG",
"format": "webp",
"originalWidth": 3000,
"originalHeight": 2000,
"width": 1600,
"height": 1067,
"frames": 1,
"quality": 80,
"withinMaxSize": null,
"megapixels": 6.0,
"originalBytes": 2858759,
"sizeBytes": 41696,
"savedPercent": 98.5,
"convertedAt": "2026-11-09T10:18:47Z",
"error": null
}

imageUrl opens the file as long as the run's storage is kept; key names it in the run's key-value store, where images.zip holds them all when ZIP of all files is on. savedPercent is below zero when the new file is larger, as a GIF's can be in another format. foundOn is the page or dataset an image came from, alt its alt text on the page, and quality what a lossy format was saved at. With a Max file size, withinMaxSize is false for the rare image that's over it even at a fifth of its size, or at the exact size cover and pad keep. An image, page or dataset that can't be read comes with url and error, saying why.

Use it as an API

Apify's API starts a run and returns its dataset as JSON; its Python and JavaScript clients, and its Make, Zapier and n8n integrations, work the same way.

curl -X POST "https://api.apify.com/v2/acts/pikoulas~image-converter/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"urls": ["https://api.apify.com/v2/key-value-stores/QOCeroT733vQ3tPPv/records/sample-photo.heic"], "format": "jpeg"}'

AI agents can call it as a tool through Apify's MCP server: https://mcp.apify.com?tools=pikoulas/image-converter.

How much does it cost?

An image is $0.002, whatever the format; reading pages and datasets, images left out as too small, and the ZIP are free. One over 16 megapixels counts once per started 16, so a 24 MP photo is two and a 48 MP one three; an animation counts all its frames. A thousand web images cost $2. Set a spending limit on a run and it stops there, with what it has converted so far.

Good to know

  • Quality goes from 1 to 100 for WebP, AVIF and JPEG; 80 is a good start for photos. PNG and GIF are lossless and only compressed, so a photo as PNG grows.
  • Transparency is kept in WebP, AVIF, PNG and GIF. JPEG has none, so transparent parts take the Background colour.
  • Pages: an image on several pages is converted once. SVG and icons are left out, since they aren't photos to convert, and so is any image under Skip images smaller than, as tracking pixels.
  • Of a TIFF with several pages or a HEIC burst, only the first image is converted, as is an animation's first frame in JPEG.
  • More memory is faster: one image at a time per GB of memory, up to eight. A 6 MP photo takes about 9 seconds at 1 GB.
  • The ZIP holds up to 300 MB; past that, the remaining files are in the store alone.
  • A site's refusal is respected. It names itself in its User-Agent and reads each site's robots.txt, one request a second per site at most. A path robots.txt refuses isn't fetched, and a site that answers 401, 403 or 451, shows a verification page or answers 429 twice is left alone for the rest of the run; the rest of your list goes on. It uses no proxy and doesn't try to get past any of this, so an image behind a check comes back with an error.
  • Only public addresses are fetched, not private networks.
  • Contact. The Actor keeps nothing itself: each image stays on disk only while it's being converted, and files and results sit in the storage of whoever ran it. Questions or requests go to spyridwn.pd@gmail.com.
  • Converts with Pillow, libavif and libheif.

FAQ

It fetches only the images you point it at, the pages you give it and the images those pages show, as anyone could open them, without logging in, and it keeps to each site's robots.txt. You are responsible for having the right to use them: images are usually someone's copyrighted work, converting one doesn't change who owns it, a site's terms may limit how you use what it publishes, and people shown in photos are protected by laws such as the GDPR and the CCPA. If you're unsure, ask a lawyer; Apify's Is web scraping legal? is a good start.

Can I convert images from my computer?

It reads URLs, pages and datasets. An image you can reach only from your own computer needs a public address first, such as a record in an Apify key-value store with public read access, or a link from your own storage.

Something missing or not working?

Open an issue on the Issues tab with the input you used, or ask there for a field you need.

If it does what you need, a review on the Reviews tab helps others find it.