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
5
Total users
1
Monthly active users
9 hours ago
Last modified
Categories
Share
Resize, crop, convert, and optimize images in bulk from uploaded files or image URLs. Use it to create product photos, thumbnails, social images, web assets, and compressed image variants with consistent dimensions and public output links.
Features
- Image uploads — Upload files directly in the Apify input UI or provide image URLs.
- Bulk resizing — Process multiple images in one run with configurable concurrency.
- Fit modes — Choose cover, contain, inside, outside, or fill for precise layout control.
- Crop positioning — Use center, edge, or corner positions for predictable crops.
- Format conversion — Export JPEG, PNG, WebP, AVIF, GIF, or keep the original format.
- Quality control — Tune lossy output quality to balance visual quality and file size.
- Metadata handling — Strip metadata by default for smaller, privacy-friendly files.
- Structured results — Get dataset records, output URLs, dimensions, formats, and file sizes.
Use Cases
E-commerce Images
Create consistent product photos for catalogs, marketplaces, and storefronts. Resize images to square or fixed-size layouts while preserving brand presentation with fit mode and background controls.
Website Optimization
Convert large source images into web-ready WebP or AVIF files. Reduce page weight, improve load speed, and prepare responsive media assets for production websites.
Content Workflows
Prepare uploaded images for blogs, newsletters, documentation, and CMS libraries. Batch-process image URLs or uploaded files without manually opening an editor for each image.
Social Media Assets
Generate standardized images for campaigns and scheduled posts. Crop and convert batches into consistent dimensions for repeated publishing workflows.
Data Pipelines
Use public output links and dataset metadata in automation tools. Feed processed image URLs into spreadsheets, databases, or downstream publishing systems.
Input Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
images | Array | Yes | Sample image URL | Upload image files or provide direct image URLs. |
width | Integer | No | Auto | Target width in pixels. Leave empty to preserve automatic sizing. |
height | Integer | No | Auto | Target height in pixels. Leave empty to preserve automatic sizing. |
fit | String | No | cover | Resize behavior: cover, contain, inside, outside, or fill. |
position | String | No | center | Crop position used by fit modes that crop or pad the image. |
format | String | No | webp | Output format: jpeg, png, webp, avif, gif, or original. |
quality | Integer | No | 80 | Quality for lossy formats from 1 to 100. |
background | String | No | #ffffff | Background color used when padding is needed. |
stripMetadata | Boolean | No | true | Removes EXIF and other metadata from output images. |
concurrency | Integer | No | 5 | Maximum number of images processed in parallel. |
Output Data
Each processed image creates a dataset record.
| Field | Type | Description |
|---|---|---|
index | Integer | Position of the image in the input list. |
status | String | SUCCEEDED or FAILED. |
source | String | Original uploaded file reference or image URL. |
sourceType | String | Source category such as url or keyValueStore. |
outputKey | String | Key of the processed image in the run storage. |
outputUrl | String | Public URL for the processed image. |
width | Integer | Final image width in pixels. |
height | Integer | Final image height in pixels. |
format | String | Final image format. |
contentType | String | MIME type of the processed image. |
inputSizeBytes | Integer | Source image size in bytes. |
outputSizeBytes | Integer | Processed image size in bytes. |
error | String | Error message when an image fails. |
The OUTPUT key contains all result records plus a summary with total, succeeded, and failed counts.
Usage Examples
Uploaded Images
Upload images in the input UI, then run with a square WebP output:
{"images": ["https://placehold.co/640x480.jpg"],"width": 800,"height": 800,"fit": "cover","format": "webp","quality": 80}
Product Photos
Create padded square product images with a white background:
{"images": ["https://example.com/product-1.jpg","https://example.com/product-2.jpg"],"width": 1200,"height": 1200,"fit": "contain","position": "center","format": "webp","quality": 90,"background": "#ffffff","stripMetadata": true}
Website Banners
Crop source images into a fixed hero image size:
{"images": ["https://example.com/campaign-photo.jpg"],"width": 1920,"height": 1080,"fit": "cover","position": "center","format": "avif","quality": 75}
Preserve Aspect Ratio
Resize images inside a maximum box without cropping:
{"images": ["https://example.com/original.png"],"width": 1600,"height": 1600,"fit": "inside","format": "original"}
Sample Output
{"index": 0,"status": "SUCCEEDED","source": "https://placehold.co/640x480.jpg","sourceType": "url","outputKey": "processed_images_0001_1777180435962.webp","outputUrl": "https://api.apify.com/v2/key-value-stores/store-id/records/processed_images_0001_1777180435962.webp","width": 800,"height": 800,"format": "webp","contentType": "image/webp","inputSizeBytes": 5987,"outputSizeBytes": 6134}
Fit Modes
| Fit mode | Best for | Behavior |
|---|---|---|
cover | Thumbnails, cards, social crops | Fills the target size and crops overflow. |
contain | Product photos, logos | Fits the whole image inside the target size and adds background padding. |
inside | Maximum dimensions | Resizes only as large as needed to fit within the box. |
outside | Minimum coverage | Resizes so both dimensions meet or exceed the target box. |
fill | Exact dimensions | Stretches to the exact target width and height. |
Tips for Best Results
Start With a Small Batch
- Test with one to five images before processing a large collection.
- Confirm output dimensions, format, and crop position before scaling up.
Choose the Right Format
- Use
webpfor a strong balance of quality and size. - Use
avifwhen smallest file size is the priority. - Use
pngwhen transparency or lossless output matters.
Control Cropping
- Use
coverfor uniform thumbnails and grids. - Use
containfor products, logos, and images that should never be cropped. - Use
positionto keep important content near a chosen edge or corner.
Manage File Size
- Keep
stripMetadataenabled unless EXIF data is required. - Lower
qualityfor smaller files. - Avoid enlarging images beyond the dimensions you actually need.
Integrations
Connect your processed image data with:
- Google Sheets — Review output URLs and image metadata.
- Airtable — Build an asset database for teams and workflows.
- Make — Send processed image URLs to automated publishing flows.
- Zapier — Trigger actions after each actor run.
- Webhooks — Deliver run results to your own systems.
- Apify API — Start runs and consume output programmatically.
Export Formats
- JSON — Use complete structured results.
- CSV — Review processed image metadata in spreadsheets.
- Excel — Share output records with business teams.
- XML — Connect with systems that require XML exports.
Frequently Asked Questions
Can I upload images directly?
Yes. The images input uses Apify's file upload field, so you can upload files or provide image URLs.
Where are processed images saved?
Processed images are saved to the run's default key-value store. The dataset and OUTPUT key include public links to each processed image.
What happens if one image fails?
The run continues processing the remaining images. Failed images receive a dataset record with status set to FAILED and an error message.
Can I keep the original image format?
Yes. Set format to original to preserve the source format while still applying resizing options.
How do I avoid cropping?
Use contain to fit the full image into a target canvas, or inside to resize within maximum dimensions without cropping.
Can I process transparent images?
Yes. Use png or webp when transparency should be preserved.
How many images can I process?
You can process batches of images in one run. Practical limits depend on image size, selected format, memory, and concurrency.
Support
For issues or feature requests, contact support through the Apify Console.
Resources
Legal Notice
This actor is designed for legitimate image processing and automation workflows. Users are responsible for ensuring they have the right to process and store the images they provide.

