Re:Vercel OG Image Generation: Fast, dynamic social card ima...
by alvarlagerlof on Tuesday October 11, 2022 @01:43AM
(#33159884)
There's my library for generating og:images statically pretty much dead. I was always wondering why Vercel didn't do this.
[ Parent
| on HN ]
Re:Vercel OG Image Generation: Fast, dynamic social card ima...
by pzrsa on Tuesday October 11, 2022 @05:59AM
(#33161387)
Care to share it? Curious to see your approach
Re:Vercel OG Image Generation: Fast, dynamic social card ima...
by alvarlagerlof on Tuesday October 11, 2022 @02:01PM
(#33166656)
Sure. This is what I did first. https://github.com/alvarlagerlof/next-banner. Its using one puppeteer process at build, for static sites. Made for Next.js.
However I was working on another version, which just reads html files for metadata instead. Not really shareable and working, built it's using vite to build a few different frameworks. https://github.com/alvarlagerlof/ogimage
Re:Vercel OG Image Generation: Fast, dynamic social card ima...
by lloydatkinson on Tuesday October 11, 2022 @10:56AM
(#33164100)
Well it won't be dead. The vercel one seems to only support running on vercel.
Re:Vercel OG Image Generation: Fast, dynamic social card ima...
by alvarlagerlof on Tuesday October 11, 2022 @02:01PM
(#33166668)
They also have satori, which will run anywhere it seems.
Re:Vercel OG Image Generation: Fast, dynamic social card ima...
by lloydatkinson on Tuesday October 11, 2022 @02:32PM
(#33167186)
That seems to generate svgs which as far as I know no site will show og embeds with svgs for some reason
Re:Vercel OG Image Generation: Fast, dynamic social card ima...
by pzrsa on Wednesday October 12, 2022 @04:45AM
(#33174448)
I use svgs for my websites og images, haven't come across an issue with embeds on most platforms.
Re:Vercel OG Image Generation: Fast, dynamic social card ima...
by shuding on Wednesday October 12, 2022 @04:24PM
(#33182568)
There are already a lot of choices to convert SVGs to PNGs, what Vercel uses is https://github.com/yisibl/resvg-js. And Sharp is another good option.