Bulk Image Optimizer & Compressor avatar

Bulk Image Optimizer & Compressor

Pricing

Pay per event

Go to Apify Store
Bulk Image Optimizer & Compressor

Bulk Image Optimizer & Compressor

Compress, resize, and convert images between PNG, JPG, WebP, and AVIF formats in bulk. Strip EXIF metadata, set quality levels, and download optimized images with detailed size reports.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Stas Persiianenko

Stas Persiianenko

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

1

Monthly active users

3 days ago

Last modified

Share

What does Bulk Image Optimizer do?

Bulk Image Optimizer & Compressor lets you compress, resize, and convert images between PNG, JPEG, WebP, and AVIF formats at scale. Provide image URLs or upload files directly, and get optimized versions with detailed size reports — all without writing any code.

Built on the sharp image processing library (the fastest Node.js image tool), this actor handles everything from simple compression to bulk format conversion with resize. It works as a pure computation tool — no browser, no proxy, no anti-bot complexity — so it runs fast and cheap.

Try it now by clicking Start with the prefilled input, or read the full guide below.

Who is Bulk Image Optimizer for?

Web developers and performance engineers

  • Optimize entire image directories before deployment
  • Convert legacy PNG/JPG assets to modern WebP/AVIF for faster page loads
  • Automate image optimization in CI/CD pipelines via the API

E-commerce teams

  • Compress product photos in bulk to reduce page weight
  • Standardize image dimensions across catalog pages
  • Strip EXIF metadata to protect photographer location data

Content creators and marketers

  • Batch-resize social media images to platform specs
  • Convert screenshots and graphics to web-friendly formats
  • Reduce email attachment sizes by compressing images

Data engineers and scrapers

  • Post-process scraped images into consistent formats
  • Reduce storage costs by compressing downloaded image datasets
  • Chain with other Apify actors for end-to-end image pipelines

Why use Bulk Image Optimizer?

  • Fast and cheap — pure computation, no browser or proxy overhead. Processes hundreds of images for pennies
  • All major formats — supports PNG, JPEG, WebP, AVIF input and output, plus GIF, TIFF, and SVG input
  • Smart resize — set max width/height and images resize proportionally. Never stretches smaller images
  • EXIF stripping — remove GPS coordinates, camera info, and other metadata for privacy and smaller files
  • Detailed reports — get original vs optimized size, savings percentage, dimensions, and download links for every image
  • No API key or account needed — just provide image URLs and go
  • API and scheduling — automate image optimization with the Apify API, webhooks, and 5,000+ app integrations via Zapier and Make
  • Download links — every optimized image gets a direct download URL from the key-value store

What data can you extract?

For each processed image, you get a complete optimization report:

FieldDescription
fileNameOutput file name with new extension
sourceUrlOriginal image URL (if provided via URL)
originalFormatDetected input format (png, jpg, webp, etc.)
outputFormatOutput format after conversion
originalSizeKBOriginal file size in kilobytes
optimizedSizeKBOptimized file size in kilobytes
savingsPercentSize reduction as a percentage
width / heightFinal image dimensions in pixels
originalWidth / originalHeightOriginal dimensions before resize
wasResizedWhether the image was resized
metadataStrippedWhether EXIF data was removed
downloadUrlDirect URL to download the optimized image

How much does it cost to optimize images?

This actor uses pay-per-event pricing — you pay only for what you process. No monthly subscription. All platform costs are included.

FreeStarter ($29/mo)Scale ($199/mo)Business ($999/mo)
Per image$0.00345$0.003$0.00234$0.0018
100 images$0.35$0.30$0.23$0.18
1,000 images$3.45$3.00$2.34$1.80

Plus a one-time $0.005 start fee per run.

On the free plan ($5 credits), you can optimize approximately 1,400 images.

Real-world cost examples:

ScenarioImagesDurationCost (Free tier)
Product photos batch50~15s~$0.18
Website image audit200~45s~$0.70
Full catalog conversion1,000~3min~$3.45

How to optimize images in bulk

  1. Go to the Bulk Image Optimizer page on Apify Store
  2. Click Start to try it with the prefilled example
  3. Add your image URLs to the Image URLs field (one per line)
  4. Choose your Output Format — WebP gives the best size-to-quality ratio for web use
  5. Adjust Quality (1-100) — 80 is a good default for most use cases
  6. Optionally set Max Width or Max Height to resize images
  7. Click Start and wait for the run to complete
  8. Download optimized images from the Key-Value Store tab, or export the metadata report from Dataset

Example input — convert to WebP:

{
"imageUrls": [
"https://example.com/photo1.jpg",
"https://example.com/photo2.png"
],
"outputFormat": "webp",
"quality": 80
}

Example input — resize and compress:

{
"imageUrls": [
"https://example.com/large-photo.jpg"
],
"outputFormat": "jpg",
"quality": 75,
"maxWidth": 1200,
"maxHeight": 800,
"stripMetadata": true
}

Example input — maximum PNG compression:

{
"imageUrls": [
"https://example.com/screenshot.png"
],
"outputFormat": "png",
"pngCompressionLevel": 9,
"stripMetadata": true
}

Input parameters

ParameterTypeDefaultDescription
imageUrlsarrayList of image URLs to optimize
outputFormatstring"original"Target format: png, jpg, webp, avif, or original (keep current)
qualityinteger80Output quality 1-100. Lower = smaller file. Only affects lossy formats (JPG, WebP, AVIF)
maxWidthintegerMax width in pixels. Images wider than this are resized proportionally
maxHeightintegerMax height in pixels. Images taller than this are resized proportionally
stripMetadatabooleantrueRemove EXIF, IPTC, and XMP metadata from images
pngCompressionLevelinteger9PNG compression 0-9. Higher = smaller file, slower processing

Output example

{
"fileName": "photo.webp",
"sourceUrl": "https://example.com/photo.jpg",
"sourceKey": null,
"originalFormat": "jpg",
"outputFormat": "webp",
"originalSizeKB": 330,
"optimizedSizeKB": 61.7,
"savingsPercent": 81.3,
"width": 800,
"height": 450,
"originalWidth": 1920,
"originalHeight": 1080,
"wasResized": true,
"metadataStripped": true,
"downloadUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/optimized-photo.webp",
"kvStoreKey": "optimized-photo.webp",
"error": null
}

Tips for best results

  • Start small — try 5-10 images first to find the right quality/format settings before running large batches
  • WebP is the best all-rounder — it gives 25-80% smaller files than JPEG at the same visual quality, and all modern browsers support it
  • AVIF gives the smallest files — but encoding is slower and some older browsers don't support it yet
  • Quality 60-80 is the sweet spot — below 60, artifacts become visible. Above 85, file size gains are minimal
  • Use original format for pure compression — when you just want smaller files without changing format
  • Strip metadata to save space — EXIF data can add 5-50KB per photo. It's removed by default
  • Resize before compressing — downscaling a 4000px photo to 1200px can save more than any compression setting
  • Schedule regular runs — set up a daily/weekly schedule to optimize new images automatically

Integrations

  • Bulk Image Optimizer -> Google Sheets — export optimization reports (original size, savings, download links) to a spreadsheet for team review
  • Bulk Image Optimizer -> Slack — get notified when a large batch finishes with a summary of total space saved
  • Bulk Image Optimizer -> Make/Zapier — chain with a file upload step to automatically optimize images uploaded to Google Drive, Dropbox, or S3
  • Scheduled runs — set a daily schedule to optimize images from a CMS or asset pipeline
  • Webhooks — trigger downstream processing (upload to CDN, update database) when optimization completes

Using the Apify API

Node.js

import { ApifyClient } from 'apify-client';
const client = new ApifyClient({ token: 'YOUR_API_TOKEN' });
const run = await client.actor('automation-lab/bulk-image-optimizer').call({
imageUrls: [
'https://example.com/photo1.jpg',
'https://example.com/photo2.png',
],
outputFormat: 'webp',
quality: 80,
});
const { items } = await client.dataset(run.defaultDatasetId).listItems();
for (const item of items) {
console.log(`${item.fileName}: ${item.savingsPercent}% saved — ${item.downloadUrl}`);
}

Python

from apify_client import ApifyClient
client = ApifyClient('YOUR_API_TOKEN')
run = client.actor('automation-lab/bulk-image-optimizer').call(run_input={
'imageUrls': [
'https://example.com/photo1.jpg',
'https://example.com/photo2.png',
],
'outputFormat': 'webp',
'quality': 80,
})
dataset = client.dataset(run['defaultDatasetId']).list_items().items
for item in dataset:
print(f"{item['fileName']}: {item['savingsPercent']}% saved — {item['downloadUrl']}")

cURL

curl -X POST "https://api.apify.com/v2/acts/automation-lab~bulk-image-optimizer/runs?token=YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"imageUrls": ["https://example.com/photo.jpg"],
"outputFormat": "webp",
"quality": 80
}'

Use with AI agents via MCP

Bulk Image Optimizer & Compressor is available as a tool for AI assistants that support the Model Context Protocol (MCP).

Add the Apify MCP server to your AI client — this gives you access to all Apify actors, including this one:

Setup for Claude Code

$claude mcp add --transport http apify "https://mcp.apify.com?tools=automation-lab/bulk-image-optimizer"

Setup for Claude Desktop, Cursor, or VS Code

Add this to your MCP config file:

{
"mcpServers": {
"apify": {
"url": "https://mcp.apify.com?tools=automation-lab/bulk-image-optimizer"
}
}
}

Your AI assistant will use OAuth to authenticate with your Apify account on first use.

Example prompts

Once connected, try asking your AI assistant:

  • "Use automation-lab/bulk-image-optimizer to convert these 10 product photos to WebP with 75% quality"
  • "Optimize all the images at these URLs and resize them to max 1200px wide"
  • "Compress these PNG screenshots to AVIF format and strip all metadata"

Learn more in the Apify MCP documentation.

Image optimization is a legitimate computational process. This actor processes images you provide (via URLs you have access to or files you upload). It does not scrape websites or bypass access controls.

Always ensure you have the rights to process the images you provide. Respect copyright and licensing terms. This actor does not store or redistribute images beyond the run's key-value store (which expires after the retention period).

FAQ

How fast is Bulk Image Optimizer? Very fast. Since it uses pure Node.js computation with the sharp library (libvips under the hood), it processes most images in under 1 second each. A batch of 100 typical web images completes in about 30-60 seconds.

Which format gives the best compression? AVIF provides the smallest file sizes (40-60% smaller than JPEG), followed by WebP (25-35% smaller than JPEG). However, AVIF encoding is slower and has less browser support. WebP is the safest choice for web use — it's supported by all modern browsers and offers excellent compression.

Can I upload images instead of providing URLs? Yes. Upload images to the run's key-value store with keys starting with input- (e.g., input-photo1.jpg, input-banner.png). The actor will detect and process them automatically alongside any URLs.

Why are some images larger after optimization? This happens when the source image is already heavily optimized. Converting a well-compressed JPEG to WebP at quality 80, for example, might produce a slightly larger file. Try lowering the quality setting or keeping the original format for already-optimized images.

Why does my image look blurry after optimization? The quality setting is too low. Try increasing it to 80-85 for photos or 90+ for images with text. PNG compression is always lossless regardless of the compression level setting.

Other image and media tools