Image Resizer API avatar
Image Resizer API

Pricing

Pay per usage

Go to Apify Store
Image Resizer API

Image Resizer API

Meet the Image Resizer API, a streamlined tool for efficient image processing. Simply provide image URLs to effortlessly resize and convert formats on the fly. Perfect for optimizing web assets and managing media at scale. Fast, reliable, and easy to integrate!

Pricing

Pay per usage

Rating

0.0

(0)

Developer

Shahid Irfan

Shahid Irfan

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

4 days ago

Last modified

Share

Professional bulk image processing and optimization at scale. Transform, resize, crop, and convert hundreds of images with a single API call. Perfect for e-commerce, content management, and automated workflows.


๐ŸŽฏ What is Image Resizer API?

Image Resizer API is a powerful batch image processing tool that transforms and optimizes images from any source. Process images from URLs or Apify storage, apply intelligent resizing and cropping, convert between formats, and deliver optimized images via public URLs.

Key capabilities:

  • โœ… Bulk Processing โ€” Process hundreds of images in parallel with configurable concurrency
  • โœ… Smart Cropping โ€” Intelligent positioning (center, top, bottom, edges) with multiple fit modes
  • โœ… Format Conversion โ€” Convert between JPEG, PNG, WebP, AVIF, and GIF formats
  • โœ… Optimization โ€” Automatic compression and metadata stripping for smaller file sizes
  • โœ… Multiple Sources โ€” Accept images from HTTP(S) URLs or Apify key-value stores
  • โœ… Public URLs โ€” Get instant public URLs for all processed images
  • โœ… Error Handling โ€” Robust per-image error handling without stopping the batch

๐Ÿš€ Use Cases

E-commerce & Product Images

Automatically resize and optimize product photos for your online store. Convert images to modern WebP format for faster page loads and better SEO.

Content Management Systems

Process user-uploaded images to multiple sizes and formats. Generate thumbnails, hero images, and optimized versions automatically.

Social Media Automation

Batch convert images to social media specifications. Create perfectly sized images for Instagram, Facebook, Twitter, and LinkedIn.

Marketing & Advertising

Optimize banner images and ad creatives. Convert legacy formats to modern, web-optimized formats.

Website Optimization

Automatically compress and resize images for better web performance. Improve Core Web Vitals and page speed scores.


๐Ÿ“‹ Features

Batch ProcessingProcess up to hundreds of images in a single run with parallel execution
Smart ResizingSpecify target dimensions with intelligent fit modes (cover, contain, inside, outside, fill)
Format ConversionConvert between JPEG, PNG, WebP, AVIF, GIF, or maintain original format
Quality ControlAdjustable quality settings (1-100) for lossy formats with optimized compression
Metadata ManagementStrip EXIF and metadata to reduce file sizes and protect privacy
Flexible InputAccept images from HTTP(S) URLs or Apify key-value store references
Aspect RatioPreserve or modify aspect ratios with smart cropping and positioning
Public URLsAutomatically generate public URLs for all processed images
Dataset ExportOptional structured dataset with metadata and processing statistics
Error RecoveryIndividual image failures don't stop batch processing

๐Ÿ’ก How to Use

Quick Start

  1. Add image sources โ€” Provide an array of image URLs or key-value store references
  2. Configure settings โ€” Set target dimensions, format, quality, and other options
  3. Run the actor โ€” Start processing and get public URLs for all optimized images
  4. Access results โ€” Download from key-value store or export dataset with metadata

Input Configuration

The actor accepts the following input parameters:

Required

ParameterTypeDescription
imagesArray of stringsList of image sources (URLs or key-value store references)

Image Dimensions

ParameterTypeDefaultDescription
widthIntegerAutoTarget width in pixels (1-10000)
heightIntegerAutoTarget height in pixels (1-10000)
fitString"cover"Resize mode: cover, contain, inside, outside, fill
positionString"center"Crop position: center, top, bottom, left, right, top-left, top-right, bottom-left, bottom-right

Format & Quality

ParameterTypeDefaultDescription
formatString"webp"Output format: jpeg, png, webp, avif, gif, original
qualityInteger80Quality for lossy formats (1-100, higher = better quality)
backgroundString"#ffffff"Background color for padding (hex or CSS color name)
stripMetadataBooleantrueRemove EXIF and other metadata

Processing Options

ParameterTypeDefaultDescription
concurrencyInteger5Maximum parallel image processing (1-20)
outputStoreIdStringDefault storeCustom key-value store ID for output images
createDatasetBooleantrueCreate dataset records with metadata

๐Ÿ“ค Input Examples

Example 1: Basic Image Resizing

{
"images": [
"https://example.com/photo1.jpg",
"https://example.com/photo2.png"
],
"width": 800,
"height": 600,
"format": "webp",
"quality": 85
}

Example 2: E-commerce Product Images

{
"images": [
"https://store.example.com/product-001.jpg",
"https://store.example.com/product-002.jpg",
"https://store.example.com/product-003.jpg"
],
"width": 1200,
"height": 1200,
"fit": "contain",
"position": "center",
"format": "webp",
"quality": 90,
"background": "#ffffff",
"stripMetadata": true,
"concurrency": 10,
"createDataset": true
}

Example 3: Using Key-Value Store

{
"images": [
"https://cdn.example.com/image1.png",
"key-value://my-store-id/original-image.jpg"
],
"width": 1920,
"height": 1080,
"fit": "cover",
"format": "avif",
"quality": 80
}

๐Ÿ“ฅ Output

Dataset Structure

Each processed image creates a dataset record with the following structure:

{
"index": 0,
"source": "https://example.com/image.jpg",
"key": "image_0_1702345678901",
"url": "https://api.apify.com/v2/key-value-stores/.../image_0_1702345678901",
"width": 1200,
"height": 800,
"format": "webp",
"sizeBytes": 45678
}

OUTPUT Key Structure

The final results are saved to the OUTPUT key in the key-value store:

{
"results": [
{
"index": 0,
"source": "https://example.com/image1.jpg",
"key": "image_0_1702345678901",
"url": "https://api.apify.com/v2/...",
"width": 1200,
"height": 800,
"format": "webp",
"sizeBytes": 45678
}
],
"summary": {
"total": 10,
"succeeded": 9,
"failed": 1
}
}

Error Handling

If an image fails to process, the result includes an error message:

{
"index": 5,
"source": "https://example.com/invalid-image.jpg",
"error": "Failed to fetch image from URL: 404 Not Found"
}

๐ŸŽจ Fit Modes Explained


๐Ÿ”ง Configuration Tips

For Best Performance

  • Use concurrency between 5-10 for optimal speed
  • Choose WebP or AVIF format for best compression
  • Set quality to 80-85 for balanced quality/size

For Best Quality

  • Use quality 90-95 for minimal quality loss
  • Set stripMetadata: false if you need to preserve EXIF data
  • Use PNG format for images with transparency

For Smallest File Size

  • Use WebP or AVIF format
  • Set quality to 70-80
  • Enable stripMetadata: true
  • Choose appropriate dimensions (don't make images larger than needed)

๐Ÿ“Š Performance

Processing SpeedUp to 20 images simultaneously with configurable concurrency
Memory Usage4GB default (suitable for most use cases)
Timeout3600 seconds (1 hour) default run time
Format SupportJPEG, PNG, WebP, AVIF, GIF (input and output)

โ“ FAQ


๐Ÿ› ๏ธ Advanced Usage

Processing Images from Apify Storage

Reference images stored in Apify key-value stores:

{
"images": [
"key-value://store-id-123/photo1.jpg",
"key-value://store-id-123/photo2.png"
]
}

Custom Output Store

Save processed images to a specific key-value store:

{
"images": ["https://example.com/image.jpg"],
"outputStoreId": "my-custom-store-id"
}

Disable Dataset Creation

For faster processing when you don't need metadata:

{
"images": ["https://example.com/image.jpg"],
"createDataset": false
}

๐Ÿ“ž Support & Feedback

If you encounter any issues or have suggestions for improvement, please reach out through the Apify Console or leave a review. Your feedback helps improve this actor for everyone!


๐Ÿท๏ธ Keywords

image optimization, image resizing, bulk image processing, image converter, format conversion, WebP converter, AVIF converter, image compression, thumbnail generator, image cropping, batch image processing, automated image optimization, e-commerce images, product photos, image API, bulk resize, image automation, web optimization, responsive images, image transformation