# Create square AVIF thumbnails

**Use case:** 

Crops images to exact 400×400 px squares (centered) and encodes them as AVIF at quality 60. Useful for listing grids and redesigns. Each result gives a direct file link, final dimensions, and the size reduction compared with the original.

## Input

```json
{
  "imageUrls": [
    "https://picsum.photos/id/433/2400/1600.jpg",
    "https://picsum.photos/id/237/1800/1200.jpg"
  ],
  "outputFormat": "avif",
  "quality": 60,
  "maxWidth": 400,
  "maxHeight": 400,
  "fit": "cover",
  "lossless": false,
  "backgroundColor": "#ffffff",
  "keepMetadata": false,
  "onlyNew": false,
  "maxConcurrency": 4,
  "maxInputSizeMb": 25
}
```

## Output

```json
{
  "fileUrl": {
    "label": "Optimized image",
    "format": "string"
  },
  "sourceUrl": {
    "label": "Source URL",
    "format": "string"
  },
  "status": {
    "label": "Status",
    "format": "string"
  },
  "format": {
    "label": "Format",
    "format": "string"
  },
  "originalBytes": {
    "label": "Original (bytes)",
    "format": "integer"
  },
  "outputBytes": {
    "label": "Optimized (bytes)",
    "format": "integer"
  },
  "savedPercent": {
    "label": "Saved %",
    "format": "number"
  },
  "width": {
    "label": "Width",
    "format": "integer"
  },
  "height": {
    "label": "Height",
    "format": "integer"
  },
  "errorMessage": {
    "label": "Error",
    "format": "string"
  }
}
```

## How it works

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

The Bulk Image Optimizer: WebP, AVIF Converter & Compressor Actor is ready to run with the inputs already set for "Create square AVIF thumbnails". [Sign up or log in](https://console.apify.com/create-task-from-example/dChF45XUCAzDhdlxQ) and you'll land in Apify Console with a copy of this exact task.

### 2. Start the "Create square AVIF thumbnails" task

The Bulk Image Optimizer: WebP, AVIF Converter & Compressor Actor will start running based on the input automatically. You can also change all the input fields, like image urls, output format, and more, to match your specific use case.

### 3. Receive the "Create square AVIF thumbnails" 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 optimized image, source url, status, 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 "Create square AVIF thumbnails" task via API](https://apify.com/actose/bulk-image-optimizer.md).

## About this Actor

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