Blend Resize Filter
blend-resize-filter
Sets the resampling kernel used when the blend layer image is resized. The default is lanczos2.
Use blend-resize-filter[N] to set the kernel for a specific blend layer.
?w=800&blend[1]=texture.png&blend-w[1]=100&blend-resize-filter[1]=nearestAccepted values
| Value | Aliases | Best for |
|---|---|---|
lanczos2 | — | Default. Photographic layers. A good balance of sharpness and freedom from artifacts. |
lanczos3 | lanczos, photo, sharp | A sharper result than lanczos2, at the cost of more ringing around high-contrast edges. |
bicubic | cubic, catmull-rom | Smooth gradients with moderate sharpening. |
mitchell | graphic, soft | Softer output with less ringing. Useful for graphics and flat color. |
bilinear | linear | Fast and smooth, noticeably softer than the cubic and lanczos kernels. |
nearest | pixel | Hard edges with no interpolation. The right choice for pixel-art badges, QR codes and UI screenshots. |
Values are matched exactly and are case-sensitive. A value that matches nothing — including a correctly spelled kernel in the wrong case, such as NEAREST — is ignored, and the layer resizes with the default lanczos2 instead of returning an error. These are the same values resize-filter takes for the base image.
Upscaling a small layer
The kernel matters most when a layer is enlarged, because every output pixel has to be invented from a handful of source pixels. The demo below takes a 40-pixel-wide pineapple and blends it in at 360 pixels: lanczos2 interpolates between the source pixels and softens the result, while nearest repeats each one as a solid block. The first entry is the same layer sourced at full size, for reference, and every other kernel is on the rows beneath.


Neither result is wrong — a photographic layer usually wants the interpolation and a pixel-art or UI layer usually does not.
Every kernel is there to switch between, but on an upscale the four smooth ones agree almost exactly: interpolating between the same handful of source pixels, lanczos3, bicubic, mitchell and bilinear all land within a pixel code or two of lanczos2. A downscale is where they separate, and resize-filter compares them there — a kernel behaves the same on a blend layer as it does on the base image.
Layers do not inherit the kernel
A blend layer resizes with lanczos2 unless blend-resize-filter is set for it, whatever resize-filter says for the base image. This holds even when blend-size=inherit makes the layer take the base image’s sizing parameters — the sizing is inherited, the kernel is not.