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

5

Total users

1

Monthly active users

9 hours ago

Last modified

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

ParameterTypeRequiredDefaultDescription
imagesArrayYesSample image URLUpload image files or provide direct image URLs.
widthIntegerNoAutoTarget width in pixels. Leave empty to preserve automatic sizing.
heightIntegerNoAutoTarget height in pixels. Leave empty to preserve automatic sizing.
fitStringNocoverResize behavior: cover, contain, inside, outside, or fill.
positionStringNocenterCrop position used by fit modes that crop or pad the image.
formatStringNowebpOutput format: jpeg, png, webp, avif, gif, or original.
qualityIntegerNo80Quality for lossy formats from 1 to 100.
backgroundStringNo#ffffffBackground color used when padding is needed.
stripMetadataBooleanNotrueRemoves EXIF and other metadata from output images.
concurrencyIntegerNo5Maximum number of images processed in parallel.

Output Data

Each processed image creates a dataset record.

FieldTypeDescription
indexIntegerPosition of the image in the input list.
statusStringSUCCEEDED or FAILED.
sourceStringOriginal uploaded file reference or image URL.
sourceTypeStringSource category such as url or keyValueStore.
outputKeyStringKey of the processed image in the run storage.
outputUrlStringPublic URL for the processed image.
widthIntegerFinal image width in pixels.
heightIntegerFinal image height in pixels.
formatStringFinal image format.
contentTypeStringMIME type of the processed image.
inputSizeBytesIntegerSource image size in bytes.
outputSizeBytesIntegerProcessed image size in bytes.
errorStringError 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 modeBest forBehavior
coverThumbnails, cards, social cropsFills the target size and crops overflow.
containProduct photos, logosFits the whole image inside the target size and adds background padding.
insideMaximum dimensionsResizes only as large as needed to fit within the box.
outsideMinimum coverageResizes so both dimensions meet or exceed the target box.
fillExact dimensionsStretches 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 webp for a strong balance of quality and size.
  • Use avif when smallest file size is the priority.
  • Use png when transparency or lossless output matters.

Control Cropping

  • Use cover for uniform thumbnails and grids.
  • Use contain for products, logos, and images that should never be cropped.
  • Use position to keep important content near a chosen edge or corner.

Manage File Size

  • Keep stripMetadata enabled unless EXIF data is required.
  • Lower quality for 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


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.