Image Resizer API

Image Resizer API

by shahidirfan

Meet the Image Resizer API, a streamlined tool for efficient image processing. Simply provide image URLs to effortlessly resize and convert formats on...

12 runs
2 users
Try This Actor

Opens on Apify.com

About 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!

What does this actor do?

Image Resizer API is a web scraping and automation tool available on the Apify platform. It's designed to help you extract data and automate tasks efficiently in the cloud.

Key Features

  • Cloud-based execution - no local setup required
  • Scalable infrastructure for large-scale operations
  • API access for integration with your applications
  • Built-in proxy rotation and anti-blocking measures
  • Scheduled runs and webhooks for automation

How to Use

  1. Click "Try This Actor" to open it on Apify
  2. Create a free Apify account if you don't have one
  3. Configure the input parameters as needed
  4. Run the actor and download your results

Documentation

Image Resizer API

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
  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
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 json { "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 json { "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 json { "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: json { "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: json { "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: json { "index": 5, "source": "https://example.com/invalid-image.jpg", "error": "Failed to fetch image from URL: 404 Not Found" } --- ## 🎨 Fit Modes Explained
cover (default)
Crop image to fill dimensions while preserving aspect ratio. Image covers entire area.
contain
Letterbox image to fit within dimensions. Entire image visible with possible padding.
inside
Resize image to fit within dimensions. Smaller than or equal to specified size.
outside
Resize image to cover dimensions. Larger than or equal to specified size.
fill
Stretch image to exact dimensions. May distort aspect ratio.
--- ## 🔧 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 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
Can I process images from private URLs?

Currently, the actor supports public HTTP(S) URLs and Apify key-value store references. For private URLs, first upload images to an Apify key-value store.

What happens if one image fails?

The actor continues processing other images. Failed images are recorded in the results with error messages.

How long are processed images stored?

Images are stored in the key-value store according to your Apify data retention settings. Default is 7 days for unnamed stores.

Can I process animated GIFs?

Yes, the actor supports GIF format. However, converting animated GIFs to other formats may result in only the first frame being saved.

What's the maximum image size I can process?

The actor can handle large images, but extremely large files (50MB+) may require increased memory allocation.

How do I preserve aspect ratio?

Specify only width OR height (not both), or use fit modes like "contain" or "inside" which preserve aspect ratio automatically.

--- ## 🛠️ Advanced Usage ### Processing Images from Apify Storage Reference images stored in Apify key-value stores: json { "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: json { "images": ["https://example.com/image.jpg"], "outputStoreId": "my-custom-store-id" } ### Disable Dataset Creation For faster processing when you don't need metadata: json { "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

Common Use Cases

Market Research

Gather competitive intelligence and market data

Lead Generation

Extract contact information for sales outreach

Price Monitoring

Track competitor pricing and product changes

Content Aggregation

Collect and organize content from multiple sources

Ready to Get Started?

Try Image Resizer API now on Apify. Free tier available with no credit card required.

Start Free Trial

Actor Information

Developer
shahidirfan
Pricing
Paid
Total Runs
12
Active Users
2
Apify Platform

Apify provides a cloud platform for web scraping, data extraction, and automation. Build and run web scrapers in the cloud.

Learn more about Apify

Need Professional Help?

Couldn't solve your problem? Hire a verified specialist on Fiverr to get it done quickly and professionally.

Find a Specialist

Trusted by millions | Money-back guarantee | 24/7 Support