# Convert JPG and PNG Images to WebP in Bulk

**Use case:** 

Paste image URLs or upload files and get WebP versions back, resized and compressed at the quality you pick. Switch the output format to AVIF, JPEG or PNG if you need it. Useful for faster web pages, Core Web Vitals fixes and shrinking product image libraries. No login, no API key, pay only per converted image.

## Input

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/python-pillow/Pillow/main/Tests/images/flower.jpg"
  ],
  "imageBase64": [
    "data:image/png;base64,iVBORw0KGgo..."
  ],
  "outputFormat": "webp",
  "quality": 80,
  "keepMetadata": false,
  "autoRotate": true,
  "lossless": false,
  "backgroundColor": "#ffffff",
  "keepAnimation": true,
  "returnBase64": false,
  "maxImages": 1000,
  "maxFileSizeMb": 25
}
```

## Output

```json
{
  "outputUrl": {
    "label": "New file",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "imageUrl": {
    "label": "Source",
    "format": "string"
  },
  "inputFormat": {
    "label": "From",
    "format": "string"
  },
  "outputFormat": {
    "label": "To",
    "format": "string"
  },
  "inputSizeBytes": {
    "label": "Bytes before",
    "format": "integer"
  },
  "outputSizeBytes": {
    "label": "Bytes after",
    "format": "integer"
  },
  "savedPercent": {
    "label": "Saved %",
    "format": "number"
  },
  "outputWidth": {
    "label": "Width",
    "format": "integer"
  },
  "outputHeight": {
    "label": "Height",
    "format": "integer"
  },
  "qualityUsed": {
    "label": "Quality",
    "format": "integer"
  },
  "targetMet": {
    "label": "Target met",
    "format": "boolean"
  },
  "note": {
    "label": "Note",
    "format": "string"
  },
  "error": {
    "label": "Error",
    "format": "string"
  }
}
```

## About this Actor

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