# Resize Product Photos to E-commerce Square

**Use case:** 

Resizes product photos to the 2048x2048 e-commerce square preset and converts them to WebP, prefilled with 2 sample images. Replace images with your own URLs, base64 data, or key-value store keys — up to 100 per run.

## Input

```json
{
  "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"
    }
  ],
  "combineImages": false,
  "targetPreset": "ecommerce_square",
  "width": 800,
  "height": 600,
  "fit": "cover",
  "position": "center",
  "paddingMode": "solid",
  "backgroundColor": "#FFFFFF",
  "outputFormat": "webp",
  "quality": 80,
  "preserveMetadata": false
}
```

## Output

```json
{
  "id": {
    "label": "ID",
    "format": "text"
  },
  "output.url": {
    "label": "Output image",
    "format": "link"
  },
  "output.width": {
    "label": "Output width",
    "format": "number"
  },
  "output.height": {
    "label": "Output height",
    "format": "number"
  },
  "output.format": {
    "label": "Format",
    "format": "text"
  },
  "output.sizeBytes": {
    "label": "Output size (bytes)",
    "format": "number"
  },
  "original.width": {
    "label": "Original width",
    "format": "number"
  },
  "original.height": {
    "label": "Original height",
    "format": "number"
  },
  "metadataPreserved": {
    "label": "Metadata preserved",
    "format": "boolean"
  }
}
```

## About this Actor

This example demonstrates how to use [Image Resizer API](https://apify.com/parsebird/image-resizer-api.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/parsebird/image-resizer-api.md) to learn more, explore other use cases, and run it yourself.


## How to integrate an Actor?

This Task's input is already configured above. Use it as-is rather than inventing a new one.

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 full API examples (JavaScript, Python, CLI, MCP, OpenAPI), see this Task's Actor page: https://apify.com/parsebird/image-resizer-api.md

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`).
