# Resize and compress product photos for an online store

**Use case:** 

Shrinks large product photos from your Apify key-value store, your uploaded files or direct image links to at most 1600 x 1600 pixels, converts them to WebP and removes camera metadata, so that shop pages load faster. Images are never enlarged and keep their aspect ratio. Each row shows how many bytes were saved. Run it as it is to try three built-in samples, then choose your own images.

## Input

```json
{
  "outputFormat": "webp",
  "quality": 82,
  "maxWidth": 1600,
  "maxHeight": 1600,
  "colorProfile": "srgb",
  "keepMetadata": false,
  "pngReduceColors": false
}
```

## Output

```json
{
  "status": {
    "label": "Status",
    "format": "string"
  },
  "inputKey": {
    "label": "Input key",
    "format": "string"
  },
  "linkNumber": {
    "label": "Link number",
    "format": "integer"
  },
  "outputUrl": {
    "label": "Output URL",
    "format": "string"
  },
  "inputFormat": {
    "label": "Input format",
    "format": "string"
  },
  "outputFormat": {
    "label": "Output format",
    "format": "string"
  },
  "inputBytes": {
    "label": "Input size (bytes)",
    "format": "integer"
  },
  "outputBytes": {
    "label": "Output size (bytes)",
    "format": "integer"
  },
  "savedPercent": {
    "label": "Saved (%)",
    "format": "number"
  },
  "inputWidth": {
    "label": "Input width",
    "format": "integer"
  },
  "inputHeight": {
    "label": "Input height",
    "format": "integer"
  },
  "outputWidth": {
    "label": "Output width",
    "format": "integer"
  },
  "outputHeight": {
    "label": "Output height",
    "format": "integer"
  },
  "hadExif": {
    "label": "Had EXIF",
    "format": "boolean"
  },
  "hadGps": {
    "label": "Had GPS location",
    "format": "boolean"
  },
  "hadXmp": {
    "label": "Had XMP",
    "format": "boolean"
  },
  "hadIptc": {
    "label": "Had IPTC",
    "format": "boolean"
  },
  "hadIccProfile": {
    "label": "Had color profile",
    "format": "boolean"
  },
  "hadComments": {
    "label": "Had comments",
    "format": "boolean"
  },
  "rotatedByExif": {
    "label": "Rotated by EXIF",
    "format": "boolean"
  },
  "chargedEvents": {
    "label": "Charged events",
    "format": "integer"
  },
  "errorCode": {
    "label": "Error code",
    "format": "string"
  },
  "errorMessage": {
    "label": "Error message",
    "format": "string"
  }
}
```

## How it works

### 1. Sign up on Apify or log in

The Image Converter & Compressor - WebP, AVIF, strip EXIF/GPS Actor is ready to run with the inputs already set for "Resize and compress product photos for an online store". [Sign up or log in](https://console.apify.com/create-task-from-example/vkZOivUZB0PPYBDYE) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Resize and compress product photos for an online store" task

The Image Converter & Compressor - WebP, AVIF, strip EXIF/GPS Actor will start running based on the input automatically. You can also change all the input fields, like output format, quality, and more, to match your specific use case.

### 3. Receive the "Resize and compress product photos for an online store" output

Monitor the progress in real time. You will be notified as soon as your dataset is complete and ready for review. Each result includes data such as status, input key, link number, and more.

### 4. Integrate into your workflow

The final output is delivered in JSON, CSV, or Excel format, ready to be plugged into your workflow. You can also [run the "Resize and compress product photos for an online store" task via API](https://apify.com/quietworkslab/image-converter.md).

## FAQ

### Which size should product photos have?

Set the maximum width and height to the largest size your shop theme displays. The product photo task uses 1600 x 1600 as an example: larger photos are shrunk to fit, smaller ones keep their size.

### Can I keep JPEG instead of WebP?

Yes. Set the output format to JPEG in the product photo task; the resizing and metadata removal work the same way.

### How do I get the resized photos?

The product photo task saves each photo in the run's key-value store, and each dataset row has its download link. You can export the rows as CSV or JSON from the run.

## About this Actor

This example demonstrates how to use [Image Converter & Compressor - WebP, AVIF, strip EXIF/GPS](https://apify.com/quietworkslab/image-converter.md) with a specific input configuration. Visit the [Actor detail page](https://apify.com/quietworkslab/image-converter.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/quietworkslab/image-converter.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`).
