# Product Image Resizer - Square, Pad, Crop for Shops & Feeds (`digivibetech/product-image-resizer`) Actor

Make shop- and feed-ready product photos: square with white padding or center crop, presets (Merchant 1200, Shopify 2048, Etsy 2000x1500, social 1080, thumbnail 400), trim borders, WebP/JPEG/PNG/AVIF, EXIF stripped. $0.004 per image, all sizes included; failures free.

- **URL**: https://apify.com/digivibetech/product-image-resizer.md
- **Developed by:** [DigiVibeTech](https://apify.com/digivibetech) (community)
- **Categories:** E-commerce, Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$4.00 / 1,000 image processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Product Image Resizer - Square, Pad, Crop for Shops & Feeds

**Product Image Resizer** — make shop- and feed-ready product photos: square with white padding or center crop, presets (Merchant 1200, Shopify 2048, Etsy 2000x1500, social 1080, thumbnail 400), trim borders, WebP/JPEG/PNG/AVIF, EXIF stripped.

> **Try it free:** press **Start** — the prefilled input runs a small real job (a few items at $0.004 each). Apify's free plan includes monthly platform credit, so a first test costs you nothing. You can also set a maximum cost per run.

- **What you get:** `sourceUrl`, `originalWidth`, `originalHeight`, `outputs`, `warnings`
- **Who it's for:** web shops, marketplace sellers and feed managers
- **Price:** $0.004 per image processed
- **Data source:** Processes only the image URLs you supply; use images you own or may use.

### What is Product Image Resizer?

Turn product photos into **shop- and feed-ready images** in bulk. Every photo gets a consistent square (or 4:3) canvas, a clean background and all the sizes you need: Merchant/Meta catalog feeds, Shopify, Etsy, social posts and thumbnails, in one run and for **one price per image**.

### ✅ Why this one

Marketplaces and shop themes look best when every product image has the same size, aspect ratio and background. Supplier photos rarely do. This actor fixes that without Photoshop actions or manual work.

### 📸 Real-run screenshots

From real run `GTMnn7IprPjsFB5cV` on Apify, 20 Nov 2026 (build 1.0.2). Images are rendered from that run's own input, dataset and charged events.

![Input of the real run](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/product-image-resizer-std-01-input.png)
![Results table (dataset)](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/product-image-resizer-std-02-results-table.png)
![One result item](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/product-image-resizer-std-03-result-item.png)
![Charged events and run cost](https://api.apify.com/v2/key-value-stores/8dx7mDMr71NbvtKdp/records/product-image-resizer-std-04-run-cost.png)

### ⬇️ What data you get

- **Presets**: `merchant-feed` 1200x1200, `shopify` 2048x2048, `etsy` 2000x1500, `social-square` 1080x1080, `thumbnail` 400x400, plus your own `customSizes` (up to 6 sizes per image)
- **Modes**: `pad` (whole product visible on a white or custom canvas), `crop` (center crop to fill), `fit` (no canvas)
- **Trim borders**: removes uneven white or transparent margins first, so products fill the frame consistently
- **No blurry upscaling** by default: small photos are centred at their own size, and you get a warning when a photo is below a platform's recommended size
- **WebP, JPEG, PNG, AVIF**; camera rotation applied; **EXIF/GPS metadata always removed**
- Download links for every file

Background removal is not included (planned).

### 🎯 Use cases

- Make square, white-padded photos for Google Merchant
- Resize to Shopify, Etsy or social presets in one run
- Trim borders and convert to WebP or AVIF

### ▶️ How to use

1. Open the actor; the input is prefilled with a small real example.
2. Replace it with your own input.
3. Press **Start**. Results appear in the **Output** tab (Overview view).
4. Download JSON, CSV or Excel, call the results via API, or schedule the actor.

### ⚙️ Input

```json
{"imageUrls": ["https://shop.example/img/mug.jpg"], "presets": ["merchant-feed", "shopify", "thumbnail"], "mode": "pad", "background": "#ffffff", "format": "jpeg"}
```

### ⬆️ Output

One dataset item per source image: `sourceUrl`, `originalWidth/Height`, `trimmedWidth/Height`, `outputs[]` (size, width, height, bytes, key, url), `warnings[]`. The files are in the run's key-value store. Failed images and reasons are in **ERRORS**; totals in **SUMMARY**.

#### Example record (real run `GTMnn7IprPjsFB5cV`, 2026-11-20)

```json
{
  "sourceUrl": "https://www.python.org/static/img/python-logo.png",
  "outputs": [
    {
      "size": "merchant-feed",
      "width": 1200,
      "height": 1200,
      "bytes": 5322,
      "contentType": "image/webp",
      "key": "img-00000-python-logo-merchant-feed.webp",
      "url": "https://api.apify.com/v2/key-value-stores/01fBvEdjDkrE8RGlc/records/img-00000-python-logo-merchant-feed.webp?signature=1oLk3vQSRqx2sI2ijvsaG"
    },
    {
      "size": "thumbnail",
      "width": 400,
      "height": 400,
      "bytes": 2574,
      "contentType": "image/webp",
      "key": "img-00000-python-logo-thumbnail.webp",
      "url": "https://api.apify.com/v2/key-value-stores/01fBvEdjDkrE8RGlc/records/img-00000-python-logo-thumbnail.webp?signature=CV1G7EREBcea8pLJbb6Y"
    }
  ],
  "originalWidth": 580,
  "originalHeight": 164,
  "originalBytes": 15770,
  "trimmedWidth": 481,
  "trimmedHeight": 140,
  "hasTransparency": true,
  "warnings": [
    "merchant-feed: source is 481x140, below the recommended 800 px (not upscaled; padded instead)",
    "thumbnail: source is 481x140, below the recommended 200 px (not upscaled; padded instead)"
  ],
  "mode": "pad",
  "format": "webp",
  "processedAt": "2026-11-20T20:55:04.619875+00:00"
}
```

### 💵 Pricing and cost estimate

| Event | Price |
|---|---|
| Image processed (all requested sizes) | $0.004 |

Failed images are free and there is no start fee. 500 product photos in 3 sizes cost $2.00.

#### Cost estimate

| Image processeds | Cost |
|---|---|
| 100 | $0.40 |
| 1,000 | $4.00 |
| 10,000 | $40.00 |

You pay only for these events: no subscription. Set **Maximum cost per run** in the run options and the actor stops before it is reached.

### 🔌 Integrations and API

Run it from **n8n, Make, Zapier, Clay** or any tool that can call an HTTP endpoint, connect a **webhook** to get notified when a run finishes, or let AI agents call it through the **Apify MCP server** (`mcp.apify.com`).

Run it and get the results in one call:

```bash
curl -X POST "https://api.apify.com/v2/acts/digivibetech~product-image-resizer/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"imageUrls": ["https://www.python.org/static/img/python-logo.png"]}'
```

Python (`pip install apify-client`):

```python
from apify_client import ApifyClient
client = ApifyClient("YOUR_APIFY_TOKEN")
run = client.actor("digivibetech/product-image-resizer").call(run_input={"imageUrls": ["https://www.python.org/static/img/python-logo.png"]})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item)
```

#### Use it in n8n, Make or Zapier

Send new supplier image URLs to the actor and copy the `outputs[].url` links into your shop or feed.

### ⚠️ Limits

- No background removal, retouching or AI upscaling. Small photos stay at their own size and get a warning unless you set `allowUpscale`.
- `trim` removes plain white or transparent borders. Busy or shadowed backgrounds are left as they are.
- Source images must be public URLs; social-network image hosts are refused and robots.txt is respected.
- Output files live in the run's key-value store, so they expire with Apify's storage retention unless you copy them.

### 🛡️ Data source, privacy and legality

Processes only the image URLs you supply; use images you own or may use.

#### Responsible use

Process only images you own or may use. We follow each site's **robots.txt**, fetch at most about one image per second per host with an honest User-Agent (`ProductImageResizer/1.0`), never log in or bypass protection, and refuse social-network image hosts.

### ❓ FAQ

#### How much does Product Image Resizer cost?

$0.004 per image processed. See the cost estimate table above. There is no monthly fee.

#### Can I try it for free?

Yes. Press Start with the prefilled input: it runs a small real job (a few items at $0.004 each). Apify's free plan includes monthly platform credit, which covers a first test.

#### Is it legal to use Product Image Resizer?

Processes only the image URLs you supply; use images you own or may use. Use the results lawfully (terms of the source, GDPR where it applies). This is not legal advice.

#### Can I use it through the API or an MCP server?

Yes. Every run is available through the Apify API and the official client libraries, and AI agents can call the actor through the Apify MCP server. See Integrations and API above.

#### Something does not work. Where do I get help?

Open an issue on the Issues tab or use [digivibetech.com/support](https://digivibetech.com/support/). Include the run ID so we can reproduce it.

### 📝 Changelog

#### 20 Nov 2026 — listing refresh

- README, listing text and input form restructured to the DigiVibeTech Apify quality standard v1. No feature or price change.

#### 1.0 — builds 1.0.1 to 1.0.2

- First build 2026-10-14, latest build 2026-10-22 (2 successful builds).

### 🧩 More DigiVibeTech actors

- [Bulk Image Converter & Compressor - WebP, AVIF, JPEG, PNG](https://apify.com/digivibetech/bulk-image-converter-compressor)
- [Bulk QR & Barcode Generator - PNG, SVG, Label PDFs](https://apify.com/digivibetech/bulk-qr-barcode-generator)
- [Universal Shop Catalog & Price Monitor](https://apify.com/digivibetech/product-data-price-tracker)
- [Broken Link & Image Checker - Sitemap or Crawl](https://apify.com/digivibetech/broken-link-image-checker)

*Maintained by DigiVibeTech. Questions or bugs: use the Issues tab or [digivibetech.com/support](https://digivibetech.com/support/); we reply within 2–5 business days.*

# Changelog

This Actor's version history is a separate document: https://apify.com/digivibetech/product-image-resizer/changelog.md

# Actor input Schema

## `imageUrls` (type: `array`):

Direct links to product photos you own or may use (JPEG, PNG, WebP, AVIF, GIF, BMP, TIFF). Up to 10,000.

## `presets` (type: `array`):

One output file per preset. All sizes of an image are included in its price.

## `customSizes` (type: `array`):

Extra sizes like 1000x1000 or 800x600 (16-8000 px). Max 6 sizes in total per image.

## `mode` (type: `string`):

pad = exact size with background bars; crop = exact size, edges cut; fit = keep aspect ratio, no canvas.

## `background` (type: `string`):

Canvas colour for pad mode (e.g. #ffffff, #f5f5f5, or 'transparent' for PNG/WebP/AVIF). White is what most marketplaces expect.

## `trimBorders` (type: `boolean`):

Cut away an even border or transparent margin first, so the product fills the canvas consistently.

## `allowUpscale` (type: `boolean`):

Enlarge small photos to the target size. Off = small photos are centred on the canvas at their own size (sharper).

## `quality` (type: `integer`):

1-100 for WebP, JPEG and AVIF.

## `format` (type: `string`):

Merchant feeds accept JPEG, PNG, WebP, GIF, BMP and TIFF; use JPEG if unsure.

## Actor input object example

```json
{
  "imageUrls": [
    "https://www.python.org/static/img/python-logo.png"
  ],
  "presets": [
    "merchant-feed",
    "thumbnail"
  ],
  "customSizes": [],
  "mode": "pad",
  "background": "#ffffff",
  "trimBorders": true,
  "allowUpscale": false,
  "quality": 85,
  "format": "webp"
}
```

# Actor output Schema

## `results` (type: `string`):

All result items (overview view)

## `errors` (type: `string`):

Inputs that could not be processed, with the reason

## `summary` (type: `string`):

Counts of processed, billed and failed items

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "imageUrls": [
        "https://www.python.org/static/img/python-logo.png"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("digivibetech/product-image-resizer").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "imageUrls": ["https://www.python.org/static/img/python-logo.png"] }

# Run the Actor and wait for it to finish
run = client.actor("digivibetech/product-image-resizer").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "imageUrls": [
    "https://www.python.org/static/img/python-logo.png"
  ]
}' |
apify call digivibetech/product-image-resizer --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,digivibetech/product-image-resizer"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/cbYB2d5IkmcVvRBQB/builds/Mvg4MT68TKggHC8Fq/openapi.json
