# Product Photo Prep: White Background for Shopify & Amazon (`digitalni.produkty.pro.zivot/product-photo-prep`) Actor

Turn supplier product photos into marketplace-ready images in bulk: AI background removal, white or any background, product centred on a square canvas, AI upscaling of small photos and presets for Shopify, Amazon, Etsy and eBay. Pay per photo.

- **URL**: https://apify.com/digitalni.produkty.pro.zivot/product-photo-prep.md
- **Developed by:** [Digitální produkty pro život](https://apify.com/digitalni.produkty.pro.zivot) (community)
- **Categories:** E-commerce, AI
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 photo prepareds

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 Photo Prep: White Background for Shopify & Amazon

Turn messy supplier, AliExpress or phone photos into **clean, consistent, marketplace-ready product images** in bulk. One run does everything:

1. **Removes the background** with AI (ISNet, open-source).
2. **Crops to the product** and **centres it** on a canvas with even margins.
3. **AI-upscales small photos** (Real-ESRGAN) so a 500 px supplier image becomes a sharp 2048 px listing photo.
4. Puts it on **pure white** (or any color, or transparent) and saves it as an optimized **JPEG, PNG or WebP**.

**Presets:** Shopify (2048×2048), Amazon (2000×2000, pure white, product ~85 %), Etsy (3000×2250), eBay (1600×1600), WooCommerce (1200×1200), social media (1080×1080), or any custom size.

**Pay per finished photo.** No subscription, no Photoshop, no GPU. Failed photos are never charged.

### Why

Marketplaces and themes look professional only when every product photo has the **same size, the same background and the same margins**. Doing that by hand takes minutes per photo. With this Actor, 1,000 photos are a single run, from a list of URLs or straight from a product scraper's results.

### Input

- **Product photo URLs**, or a **dataset** from another Actor (e.g. a Shopify or AliExpress product scraper). The image field is detected automatically.
- **Marketplace preset**, or a custom width and height.
- **Remove background** (on by default). Turn it off to keep the original photo and only fit and pad it.
- **AI upscale small photos** (on by default, used when the product needs 1.5× enlargement or more).
- **Background color**: `#ffffff` by default, any hex color, or `transparent`.
- **Product size**: how much of the canvas the product fills (85 % by default).
- **Maximum file size**: optional, e.g. 500 KB for fast-loading shop pages.

### Output

Each photo becomes one dataset row with a direct link to the finished image:

```json
{
  "sourceUrl": "https://example.com/supplier/sku-1001.jpg",
  "imageUrl": "https://api.apify.com/v2/key-value-stores/<id>/records/photo-0001.jpg",
  "preset": "shopify",
  "originalWidth": 500,
  "originalHeight": 375,
  "width": 2048,
  "height": 2048,
  "backgroundRemoved": true,
  "aiUpscaled": true,
  "format": "jpeg",
  "fileSizeBytes": 184211,
  "processingMs": 9400
}
```

### Pricing

You pay **per finished photo**, any size. Photos that fail to download or process are not charged.

### Use cases

- **Shopify / WooCommerce stores**: consistent product grids from supplier photos.
- **Dropshipping**: clean up AliExpress and supplier images before importing products.
- **Amazon, eBay, Etsy sellers**: white-background main images at the recommended size.
- **Catalogs and feeds**: Google Shopping and Meta catalog images with a uniform look.

### How to use it via API

```python
from apify_client import ApifyClient

client = ApifyClient("<YOUR_API_TOKEN>")
run = client.actor("digitalni.produkty.pro.zivot/product-photo-prep").call(run_input={
    "imageUrls": ["https://example.com/supplier/sku-1001.jpg"],
    "preset": "amazon",
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["imageUrl"])
```

### Good to know

- Works best when the product clearly stands out from the background. Dark products on dark backgrounds or very busy scenes can leave parts missing, so test a few of your own photos first.
- If no product is detected, the whole photo is kept and fitted to the canvas.
- Marketplace rules change. Check your marketplace's current image requirements, especially for Amazon main images.
- Only process images you have the rights to use.
- Models: ISNet (DIS) general-use, Apache-2.0, ONNX export by the rembg project; Real-ESRGAN `realesr-general-x4v3` by Xintao Wang et al., BSD-3-Clause.

### More tools from the same developer

All tools with code examples: [github.com/Phenixik/apify-actors](https://github.com/Phenixik/apify-actors)

- [remove.bg API Alternative](https://apify.com/digitalni.produkty.pro.zivot/removebg-api-dropin): drop-in replacement for the remove.bg API, change one URL
- [AI Background Remover](https://apify.com/digitalni.produkty.pro.zivot/background-remover): bulk transparent PNGs, white backgrounds and masks
- [AI Image Upscaler](https://apify.com/digitalni.produkty.pro.zivot/ai-image-upscaler): 2x / 4x Real-ESRGAN upscaling, no GPU
- [App Icon & Screenshot Generator](https://apify.com/digitalni.produkty.pro.zivot/app-icon-generator): every iOS, Android and PWA icon size from one image
- [Website Screenshot](https://apify.com/digitalni.produkty.pro.zivot/website-screenshot): full-page, mobile and PDF screenshots
- [Sitemap URL Extractor](https://apify.com/digitalni.produkty.pro.zivot/sitemap-url-extractor): every URL from a website's sitemaps
- [Broken Link Checker](https://apify.com/digitalni.produkty.pro.zivot/broken-link-checker): find 404s and dead links on your site
- [PageSpeed & Lighthouse Audit](https://apify.com/digitalni.produkty.pro.zivot/pagespeed-audit): bulk Core Web Vitals and SEO scores
- [Domain WHOIS & DNS Lookup](https://apify.com/digitalni.produkty.pro.zivot/domain-whois-lookup): expiry, DNS, SPF/DMARC and SSL for many domains
- [PDF Text Extractor](https://apify.com/digitalni.produkty.pro.zivot/pdf-text-extractor): text, Markdown and RAG chunks from PDFs
- [E-book Converter](https://apify.com/digitalni.produkty.pro.zivot/ebook-converter): Word, Google Docs or Markdown to PDF and EPUB
- [RSS Feed Reader & Monitor](https://apify.com/digitalni.produkty.pro.zivot/rss-feed-reader): only-new-items feed monitoring
- [ATS Jobs](https://apify.com/digitalni.produkty.pro.zivot/ats-jobs): jobs from Greenhouse, Lever, Ashby & more
- [App Store Reviews](https://apify.com/digitalni.produkty.pro.zivot/app-store-reviews): iOS reviews from 50+ countries

### Questions or ideas?

Open an issue on the **Issues** tab. Feature requests (drop shadows, lifestyle backgrounds…) are welcome.

# Actor input Schema

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

Direct links to product photos (JPEG, PNG, WebP, GIF, TIFF, AVIF), e.g. supplier or AliExpress images. One finished photo per link. Or use a dataset below.

## `datasetId` (type: `string`):

Process the images found in the results of another Actor run, for example a Shopify, AliExpress, Amazon or e-shop product scraper. Pick the dataset here, or in an integration pass {{resource.defaultDatasetId}}. Can be combined with the URLs above.

## `imageUrlField` (type: `string`):

Field that holds the image URL or a list of image URLs, dot paths allowed (e.g. images, product.mainImage, media.0.src). Leave empty to detect common fields automatically (imageUrl, image, images, thumbnail, …).

## `maxImagesPerItem` (type: `integer`):

How many images to take from each dataset item (1 = main image only). Each photo is billed separately.

## `maxDatasetItems` (type: `integer`):

Safety limit on how many dataset items are read.

## `preset` (type: `string`):

Canvas size and how much of it the product fills. Shopify 2048×2048, Amazon 2000×2000 (pure white, product ~85 %), Etsy 3000×2250 (4:3), eBay 1600×1600, WooCommerce 1200×1200, Social 1080×1080. Use Custom with your own width and height.

## `removeBackground` (type: `boolean`):

Cut the product out of its original background and crop to it. Turn off to keep the original photo and only resize and pad it to the canvas.

## `upscale` (type: `boolean`):

When the product has to be enlarged 1.5× or more, use the Real-ESRGAN AI upscaler instead of a plain resize, which gives sharper edges and texture.

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

Hex color like #ffffff (white) or #f5f5f5, or "transparent" for a transparent PNG/WebP. Leave empty for the preset's background (white).

## `fillPercent` (type: `integer`):

How much of the canvas width or height the product may fill. Leave empty for the preset value (85 % for Amazon and Shopify).

## `width` (type: `integer`):

Overrides the preset width.

## `height` (type: `integer`):

Overrides the preset height.

## `outputFormat` (type: `string`):

JPEG is smallest and what marketplaces expect. PNG and WebP can keep a transparent background.

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

Compression quality, 40–100.

## `maxFileSizeKb` (type: `integer`):

Optional. The quality is lowered step by step (down to 40) until the JPEG/WebP file fits, e.g. 500 for fast-loading shop pages. 0 = no limit.

## `maxFileSizeMb` (type: `integer`):

Source images larger than this are skipped (not charged).

## Actor input object example

```json
{
  "imageUrls": [
    "https://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Four_Small_Canvas_Dog_Shoes.jpg/500px-Four_Small_Canvas_Dog_Shoes.jpg",
    "https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Nikon_camera_on_a_table.jpg/500px-Nikon_camera_on_a_table.jpg"
  ],
  "maxImagesPerItem": 1,
  "maxDatasetItems": 1000,
  "preset": "shopify",
  "removeBackground": true,
  "upscale": true,
  "outputFormat": "jpeg",
  "quality": 90,
  "maxFileSizeKb": 0,
  "maxFileSizeMb": 30
}
```

# Actor output Schema

## `photos` (type: `string`):

Download link, size, whether the background was removed and the photo AI-upscaled.

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

Counts of prepared and failed photos with reasons and the settings used.

# 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://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Four_Small_Canvas_Dog_Shoes.jpg/500px-Four_Small_Canvas_Dog_Shoes.jpg",
        "https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Nikon_camera_on_a_table.jpg/500px-Nikon_camera_on_a_table.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("digitalni.produkty.pro.zivot/product-photo-prep").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://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Four_Small_Canvas_Dog_Shoes.jpg/500px-Four_Small_Canvas_Dog_Shoes.jpg",
        "https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Nikon_camera_on_a_table.jpg/500px-Nikon_camera_on_a_table.jpg",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("digitalni.produkty.pro.zivot/product-photo-prep").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://upload.wikimedia.org/wikipedia/commons/thumb/8/88/Four_Small_Canvas_Dog_Shoes.jpg/500px-Four_Small_Canvas_Dog_Shoes.jpg",
    "https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Nikon_camera_on_a_table.jpg/500px-Nikon_camera_on_a_table.jpg"
  ]
}' |
apify call digitalni.produkty.pro.zivot/product-photo-prep --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,digitalni.produkty.pro.zivot/product-photo-prep"
        }
    }
}
```

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/BWU3YG8IIXXnteMAK/builds/F5Ox6Z0Ip3JxQHVRj/openapi.json
