Image not rendered inside PDF (satori + PDFKit)
Bug report
Description / Observed Behavior
image not rendered inside PDF (satori + PDFKit) got this in console
SVGElemImage: failed to open image "data:image/svg+xml;utf8,%3Csvgfill=%22%23000%22xmlns=%22http://www.w3.org/2000/svg%22viewBox=%22007565%22width=%2275%22height=%2265%22%3E%3Cpathd=%22M37.59.25l36.9564H.64l36.95-64z%22%3E%3C/path%3E%3C/svg%3E" in PDFKit
Expected Behavior
The image should have rendered
How did you expect Satori to behave here?
Reproduction
Go to https://og-playground.vercel.app/ and click on PDF preview
This is a known bug: svg is not supported by pdf kit
See https://github.com/vercel/satori/pull/118#issuecomment-1238215272 for more details.
We should probably change the playground example to avoid this bug.
We should probably change the playground example to avoid this bug.
True. I thought it was a error by opening the console. I'd be happy to send a fix if any.
I'm thinking about making a better PDF solution with probably https://github.com/typst/svg2pdf, while this one in the playground is more like a quick proof of concept.