satori icon indicating copy to clipboard operation
satori copied to clipboard

`filter: "blur(...)"` doesn't work as expected with Satori + resvg-js

Open peterfritz opened this issue 1 year ago • 2 comments

Bug report

Description / Observed Behavior

The CSS property filter: "blur(...)" doesn't work properly when used in conjunction with resvg-js to generate a PNG image.

Expected Behavior

Expected Observed

Reproduction

Vercel OG Playground

Additional Context

First observed in Next.js version 14.0.1 using ImageResponse from next/og. Reproduced in Vercel OG Playground that lists Satori's version as 0.0.0-development.

peterfritz avatar Nov 09 '23 11:11 peterfritz

This requires upgrading resvg-js to the latest version (2.6.0). Try it: https://resvg-js.vercel.app/

PR: https://github.com/vercel/satori/pull/572

image

yisibl avatar Nov 10 '23 07:11 yisibl

Oh, that's way better! The maximum blur size is twice the shape's size? Is this a technical limitation or an issue with my code?

image

peterfritz avatar Nov 10 '23 14:11 peterfritz