Image Resizer API avatar

Image Resizer API

Pricing

$4.50 / 1,000 processed images

Go to Apify Store
Image Resizer API

Image Resizer API

Resize and convert submitted images with optional compression controls. Get generated file URLs, dimensions, formats, and byte sizes for each successful image.

Pricing

$4.50 / 1,000 processed images

Rating

0.0

(0)

Developer

Maxime Dupré

Maxime Dupré

Maintained by Community

Actor stats

0

Bookmarked

20

Total users

5

Monthly active users

15 days ago

Last modified

Share

🖼️ Image resizer API for batch image resizing

Developers, ecommerce teams, marketers, and creators can send image URLs, base64 data, or Apify key-value-store files and get resized image files plus dataset rows with source details, dimensions, formats, byte sizes, and downloadable output URLs. Choose a fixed size, a preset, fit, padding, format, quality, and metadata handling in one run.

  • Use Image resizer to resize a batch to custom dimensions or a ready-made preset.
  • Use Compress image to make JPEG, WebP, or AVIF files smaller with quality and size-limit controls.
  • Use Resize image online to run image processing from Apify Console, API calls, schedules, or integrations.
  • Use Image resizer free to test a small batch before using a larger image list.
  • Use Resize image to 100kb to set an optional 100 KB file-size target for generated images.

📦 Generated image files and measured data

Every successful image transformation creates one dataset row and one generated file. The row links to the file in the run's default key-value store and keeps the source details next to original and output measurements.

Included in each row

  • id keeps your optional image ID for matching the row to an input image.
  • source records the submitted source type, URL or key, and filename when available.
  • original records the source width, height, format, content type, and byte size.
  • output records the downloadable file URL, width, height, format, content type, and byte size.
  • metadataPreserved shows whether source metadata was kept.
  • fileSizeLimitMb shows the applied output size limit when one was requested or implied by a preset.

Open the dataset to export rows as JSON, CSV, Excel, XML, RSS, or HTML. Use each row's output.url to download its generated image file.

This Actor handles submitted image data only. It does not generate new images with AI, add watermarks, discover images from webpages, or provide general photo editing. It does not require a third-party image-processing API key.

🚀 Run image batches with clear settings

Quick start

  1. Add one or more image sources in Images.
  2. Choose Target size, or leave it on Custom size and set Custom width and Custom height.
  3. Pick Resize fit, Padding style, and Output format.
  4. Set Quality or Maximum file size for supported lossy formats when you need smaller output files.
  5. Start the Actor.
  6. Open the dataset for output rows and use each row's output.url for generated files.

For a quick first run, keep the prefilled sample images, leave Target size on Custom size, and use the default WebP output.

⚙️ Input

Use the fields below to choose source images and the desired output. The images list accepts 1 to 100 source objects. Each object should provide a url, base64, or keyValueStoreKey value.

Input fields

FieldTypeWhat it does
imagesarrayRequired list of 1 to 100 image objects to process.
images[].urlstringPublic HTTP or HTTPS image URL.
images[].base64stringBase64-encoded image data.
images[].keyValueStoreKeystringApify key-value-store record key for an uploaded image.
images[].idstringOptional stable ID copied to the output.
images[].filenamestringOptional generated filename.
combineImagesbooleanSet to true with 2 or 3 sources to create one combined output image.
targetPresetstringSelect custom, ecommerce_square, website_thumbnail, social_square, whatsapp_carousel, whatsapp_catalog_thumbnail, or whatsapp_template_header for custom, e-commerce, website, social, or WhatsApp layouts.
widthintegerOutput width in pixels for custom; accepts 1 to 10000.
heightintegerOutput height in pixels for custom; accepts 1 to 10000.
fitstringChooses cover, contain, fill, inside, or outside behavior.
positionstringAnchors the image at center, top, bottom, left, right, top-left, top-right, bottom-left, or bottom-right.
paddingModestringFills extra space with solid, blur, or edge_extend padding.
backgroundColorstringHex color for solid padding and transparent areas.
outputFormatstringSelects webp, jpeg, png, avif, gif, tiff, or original output.
qualityintegerSets quality for lossy formats such as JPEG, WebP, and AVIF from 1 to 100.
maxFileSizeMbnumber or nullOptional output size limit in MB for supported lossy formats, from 0.1 to 50.
preserveMetadatabooleanKeeps EXIF and other metadata when true; the default is false.

This example shows a successful batch with the prefilled image sources and default settings.

{
"images": [
{
"url": "https://placehold.co/1200x800.jpg?text=sample-1",
"id": "sample-image-1"
},
{
"url": "https://placehold.co/1280x840.jpg?text=sample-2",
"id": "sample-image-2"
},
{
"url": "https://placehold.co/1360x880.jpg?text=sample-3",
"id": "sample-image-3"
},
{
"url": "https://placehold.co/1440x920.jpg?text=sample-4",
"id": "sample-image-4"
},
{
"url": "https://placehold.co/1520x960.jpg?text=sample-5",
"id": "sample-image-5"
}
],
"combineImages": false,
"targetPreset": "custom",
"width": 800,
"height": 600,
"fit": "cover",
"position": "center",
"paddingMode": "solid",
"backgroundColor": "#FFFFFF",
"outputFormat": "webp",
"quality": 80,
"preserveMetadata": false
}

Use url for public HTTP or HTTPS image files, base64 for image bytes, or keyValueStoreKey for an uploaded image in the run key-value store. Add id or filename when you want stable matching in the output.

🧾 Output

The results link in the Output panel opens the default dataset overview. Use each output.url to download the generated image file. Each successful output uses the row shape below. Failed sources do not create successful rows, while other sources can continue in the same run.

Run output

FieldTypeWhat it does
resultsstringOpens the default dataset overview with one row for each successfully generated image.

Dataset row fields

FieldTypeWhat it does
idstring or nullOptional image ID copied from input.
sourceobjectSubmitted source details.
source.typestringSource type: url, base64, or keyValueStore.
source.urlstring or nullSubmitted source URL when the image came from a URL.
source.keyValueStoreKeystring or nullSubmitted source key when the image came from the run key-value store.
source.filenamestring or nullUser-provided or source filename used for row reconciliation.
originalobjectMeasured facts from the source image.
original.widthintegerSource image width in pixels.
original.heightintegerSource image height in pixels.
original.formatstringSource image format.
original.contentTypestringSource image MIME type.
original.sizeBytesintegerSource image file size in bytes.
outputobjectGenerated image file and measured output facts.
output.urlstringDirect downloadable URL for the generated image file.
output.widthintegerGenerated image width in pixels.
output.heightintegerGenerated image height in pixels.
output.formatstringGenerated image format.
output.contentTypestringGenerated image MIME type.
output.sizeBytesintegerGenerated image file size in bytes.
metadataPreservedbooleanWhether EXIF and other source metadata were preserved.
fileSizeLimitMbnumber or nullApplied output file size limit in MB when requested or implied by a preset.

Genuine example row

This complete row comes from a successful current-beta batch run with public image URLs.

{
"id": "sample-image-1",
"source": {
"type": "url",
"url": "https://placehold.co/1200x800.jpg?text=sample-1",
"keyValueStoreKey": null,
"filename": "1200x800.jpg"
},
"original": {
"width": 1200,
"height": 800,
"format": "jpeg",
"contentType": "image/jpeg",
"sizeBytes": 12722
},
"output": {
"url": "https://api.apify.com/v2/key-value-stores/vta29acCSdrwoGfPz/records/sample-image-1-800x600.webp",
"width": 800,
"height": 600,
"format": "webp",
"contentType": "image/webp",
"sizeBytes": 2846
},
"metadataPreserved": false,
"fileSizeLimitMb": null
}

💳 Pricing

This Actor uses pay-per-event pricing. The image-processed event costs $0.0045 for each image successfully processed and saved with a downloadable output URL. Failed image attempts and skipped inputs do not create this event.

🔌 Integrations

  • Call the Actor through the Apify API when your app needs repeatable image resizing from URLs, base64 data, or uploaded files.
  • Schedule recurring runs for product catalogs, campaign assets, or image batches that need the same output settings.
  • Export dataset rows to JSON, CSV, Excel, XML, RSS, or HTML for review and reporting.
  • Use webhooks to send generated output URLs and metadata to downstream storage, CMS, or automation tools.

❓ FAQ

Can I process many images in one run?

Yes. images accepts up to 100 source objects. Without combineImages, each successfully processed source creates one generated file and one dataset row. With combineImages, two or three sources create one combined file and row.

What happens when one image fails?

The Actor skips that source, writes one concise warning naming the submitted image, and continues with the rest of the batch when possible. The failed source does not create a dataset row or an image-processed event.

Can I use base64 data or an uploaded image?

Yes. Put base64 image bytes in base64, or point keyValueStoreKey to an uploaded image in the run key-value store.

Can I compress images as well as resize them?

Yes. Choose JPEG, WebP, or AVIF and set quality or maxFileSizeMb. The output row reports original and generated byte sizes.

Can I resize image online without hosting files myself?

Yes. Submit a public image URL, base64 data, or an uploaded image key. Generated files are saved in the run key-value store and linked from each output row.

How do I avoid cropping?

Use contain to fit the full image inside the target canvas with padding, or use inside to stay within the target bounds without cropping.

Can I keep the source metadata?

Yes. Set preserveMetadata to true. The metadataPreserved field reports the applied setting in each row.

Can I set a maximum file size?

Yes. Set maxFileSizeMb for a supported lossy output or choose a preset with an output size limit. The row reports the applied limit in fileSizeLimitMb.

Can I combine images?

Yes. Set combineImages to true and provide 2 or 3 source images for one combined output.

What output formats are supported?

You can choose WebP, JPEG, PNG, AVIF, GIF, TIFF, or original when the source format is supported.

Do I need a third-party image-processing API key?

No. The Actor processes the image bytes you provide and does not require an external image-processing account or API key.

What are image resizer API alternatives?

Alternatives include hosted image CDNs, command-line tools such as Sharp-based scripts, online resize forms, or custom backend jobs. This Actor fits workflows that use Apify runs, API calls, schedules, webhooks, exports, and generated file storage.

📝 Changelog

v2.0 (08-09-2026)

  • Output rows now use a smaller shape with source details, generated image details, metadata status, and file-size limits.
  • The separate generated-files output link and file-key field are no longer included.
  • Failed images now show a short warning with the submitted image name while processing continues.
  • Partial batches now show the number of completed images so far and the exact final count.

v1.0

  • Initial release.

🆘 Support

For issues, questions, or feature requests, file a ticket and I'll fix or implement it in less than 24h 🫡

Made with ❤️ by Maxime Dupré