# What is a WebP file? Everything you need to know about the WebP format

A **WebP file** is a web-focused raster image that supports lossy compression, lossless compression, alpha transparency, and animation. It was introduced by Google to provide smaller alternatives to JPEG, PNG, and GIF while covering their most common capabilities in one format.

## How does WebP work?

Lossy WebP uses predictive compression related to the VP8 video codec. It predicts blocks from nearby pixels and stores the residual information. Lossless WebP uses dedicated transforms and entropy coding to compress exact pixel values. Both modes can include a full alpha channel.

Animated WebP stores multiple frames and timing data. Unlike GIF, it is not restricted to a 256-color palette.

## Benefits of WebP

* **Versatile compression:** supports both lossy photographs and lossless graphics.
* **Transparency:** can replace many PNG assets while reducing transfer size.
* **Animation:** often produces smaller, higher-color animations than GIF.
* **Strong browser support:** works across current major browsers.
* **Fast encoding and decoding:** mature tooling makes it practical for dynamic pipelines.

## Limitations of WebP

Older browsers, operating systems, email clients, and desktop tools may not support WebP. AVIF can compress some images more efficiently and offers stronger HDR capabilities, while JPEG and PNG still provide safer interchange with legacy software.

For broad public delivery, use content negotiation or a `<picture>` fallback if old clients matter.

## WebP compared with JPEG, PNG, and AVIF

|Format|Best fit|Transparency|Typical tradeoff|
|-|-|-|-|
|WebP|General modern-web images|Yes|Balanced speed, size, and support|
|JPEG|Universal photo exchange|No|Wider legacy compatibility|
|PNG|Exact graphics and screenshots|Yes|Larger files|
|AVIF|Maximum modern compression and HDR|Yes|Slower encoding|

## How to convert images to WebP with Transloadit

Use [🤖/image/resize](/de/docs/robots/image-resize.md) to resize and encode a WebP derivative:

```json
{
  "steps": {
    ":original": { "robot": "/upload/handle" },
    "webp": {
      "use": ":original",
      "robot": "/image/resize",
      "format": "webp",
      "width": 1600,
      "quality": 82,
      "resize_strategy": "fit"
    }
  }
}

```

## WebP FAQ

### Does WebP support transparency?

Yes. Lossy and lossless WebP images can include an alpha channel.

### Is WebP better than JPEG?

WebP usually offers more capabilities and often creates a smaller file at comparable visual quality. JPEG remains useful when universal legacy compatibility is the deciding requirement.

### WebP or AVIF: which should I use?

Choose WebP for a strong balance of encoding speed and compatibility. Evaluate AVIF when the smallest transfer size, HDR, or higher bit depth is more important.

## Related demos

* [Convert images to WebP EN (English)](/demos/image-processing/convert-to-webp/)
* [Convert WebP to JPEG EN (English)](/demos/image-processing/convert-an-image-from-webp-to-jpg/)
* [Convert WebP to PNG EN (English)](/demos/image-processing/convert-an-image-from-webp-to-png/)
