---
title: resize-filter
summary: null
url: https://www.fastly.com/documentation/reference/io/resize-filter
---

The `resize-filter` parameter enables control over the resizing filter used to generate a new image with a higher or lower number of pixels.

## Syntax

```text
resize-filter={value}
```

## Allowed values

| Value                     | Description                                                                                                                                                               |
| ------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `nearest`                 | Uses the value of nearby translated pixel values.                                                                                                                         |
| `bilinear` (or `linear`)  | Uses an average of a 2x2 environment of pixels.                                                                                                                           |
| `bicubic` (or `cubic`)    | Uses an average of a 4x4 environment of pixels, weighing the innermost pixels higher.                                                                                     |
| `lanczos2`                | Uses the Lanczos filter to increase the ability to detect edges and linear features within an image and uses sinc resampling to provide the best possible reconstruction. |
| `lanczos3`( or `lanczos`) | Lanczos3 uses a better approximation of the sinc resampling function. **_(Default)_**                                                                                     |

## Notes

1. When making an image smaller, use `bicubic`, which has a natural sharpening effect.
2. When making an image larger, use `bilinear`, which has a natural smoothing effect.
3. When resizing pixel art, use `nearest`, which has a natural pixelation effect.
4. When quality is the main concern, use `lanczos`, which typically renders the best results.

## Examples

Click the links to view the transformed image using a demo Fastly IO service.

| Example usage                                                                       | Description                                                       |
| ----------------------------------------------------------------------------------- | ----------------------------------------------------------------- |
| [`?resize-filter=bilinear`](https://www.fastly.io/image.jpg?resize-filter=bilinear) | Deliver an image that has been resized using the bilinear filter. |
