3 ms·
The SVG -> PNG part is handled by @vercel/og. Specifically, it uses Vercel Edge Functions + WebAssembly to handle generating images at the edge. https://vercel
by leerob 4y ago
The SVG -> PNG part is handled by @vercel/og. Specifically, it uses Vercel Edge Functions + WebAssembly to handle generating images at the edge.
https://vercel.com/docs/concepts/functions/edge-functions/og-image-generation https://vercel.com/docs/concepts/functions/edge-functions/og...
- eyelidlessness 4y agoThanks! Not to discourage anyone from using Vercel services if they’re interested (y’all are doing great stuff on this and lots of other fronts), but! I’d be remiss if I didn’t point out the unpublished-but-MIT-licensed repo I could find. For anyone else who’s curious it looks like the pertinent source[1] can be self-hosted. I’m on mobile so I’m gonna limit my peering into the source, but it appears to wrap Chromium to do the PNG generation. Quite a bit different from my solution (which takes SVG-producing JSX and anything producing CSS, and renders to PNG with Sharp). I’m curious how much overhead using Chromium adds, and whether alternatives like Sharp were considered. 1: https://github.com/vercel/og-image https://github.com/vercel/og-image
- styfle 4y agoSee this issue: https://github.com/vercel/og-image/issues/148 https://github.com/vercel/og-image/issues/148