Open JeroenReumkens opened 1 year ago
implement a fix in #404
it should allow to create image fallback
Great work @jeetiss! Didn’t see that pr, only searched the issues apparently. Hopefully it gets merged soon!
Edit: oh it’s actually a new PR! Even better 🙏 Thanks for making a pr so fast!
Image fallback is a nice feature, since browsers already have that for decades!
good feature request!I will impl it recently @JeroenReumkens
Feature Request
Description
Hey! At Cal.com we are using Satori and Vercel OG to render quite a few dynamic images. There's however situations where there's an error because for example a users avatar throws an error, or a certain screenshot we make for all pages of our marketing site isn't screenshot properly and thus errors. If I'm correct whenever such an error occurs, this occurs during the parsing of the readable stream? Since I did try to wrap a try catch around the
new ImageResponse
, but that doesn't seem to be what causes the error.So I'm wondering if there's a way to catch these errors, and then return a different fallback image. Or even better would be if this fallback image would be a default option of Satori / Vercel OG itself. This way we won't have broken images, but have a fallback image.
Thanks for this great library! ✌️