Image Resizer API
Pricing
Pay per usage
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
Actor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
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 Processing | Process up to hundreds of images in a single run with parallel execution |
| Smart Resizing | Specify target dimensions with intelligent fit modes (cover, contain, inside, outside, fill) |
| Format Conversion | Convert between JPEG, PNG, WebP, AVIF, GIF, or maintain original format |
| Quality Control | Adjustable quality settings (1-100) for lossy formats with optimized compression |
| Metadata Management | Strip EXIF and metadata to reduce file sizes and protect privacy |
| Flexible Input | Accept images from HTTP(S) URLs or Apify key-value store references |
| Aspect Ratio | Preserve or modify aspect ratios with smart cropping and positioning |
| Public URLs | Automatically generate public URLs for all processed images |
| Dataset Export | Optional structured dataset with metadata and processing statistics |
| Error Recovery | Individual image failures don't stop batch processing |
๐ก How to Use
Quick Start
- Add image sources โ Provide an array of image URLs or key-value store references
- Configure settings โ Set target dimensions, format, quality, and other options
- Run the actor โ Start processing and get public URLs for all optimized images
- Access results โ Download from key-value store or export dataset with metadata
Input Configuration
The actor accepts the following input parameters:
Required
| Parameter | Type | Description |
|---|---|---|
images | Array of strings | List of image sources (URLs or key-value store references) |
Image Dimensions
| Parameter | Type | Default | Description |
|---|---|---|---|
width | Integer | Auto | Target width in pixels (1-10000) |
height | Integer | Auto | Target height in pixels (1-10000) |
fit | String | "cover" | Resize mode: cover, contain, inside, outside, fill |
position | String | "center" | Crop position: center, top, bottom, left, right, top-left, top-right, bottom-left, bottom-right |
Format & Quality
| Parameter | Type | Default | Description |
|---|---|---|---|
format | String | "webp" | Output format: jpeg, png, webp, avif, gif, original |
quality | Integer | 80 | Quality for lossy formats (1-100, higher = better quality) |
background | String | "#ffffff" | Background color for padding (hex or CSS color name) |
stripMetadata | Boolean | true | Remove EXIF and other metadata |
Processing Options
| Parameter | Type | Default | Description |
|---|---|---|---|
concurrency | Integer | 5 | Maximum parallel image processing (1-20) |
outputStoreId | String | Default store | Custom key-value store ID for output images |
createDataset | Boolean | true | Create 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
concurrencybetween 5-10 for optimal speed - Choose WebP or AVIF format for best compression
- Set
qualityto 80-85 for balanced quality/size
For Best Quality
- Use
quality90-95 for minimal quality loss - Set
stripMetadata: falseif you need to preserve EXIF data - Use PNG format for images with transparency
For Smallest File Size
- Use WebP or AVIF format
- Set
qualityto 70-80 - Enable
stripMetadata: true - Choose appropriate dimensions (don't make images larger than needed)
๐ Performance
| Processing Speed | Up to 20 images simultaneously with configurable concurrency |
| Memory Usage | 4GB default (suitable for most use cases) |
| Timeout | 3600 seconds (1 hour) default run time |
| Format Support | JPEG, 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