Hacker News new | ask | show | jobs
by alvarlagerlof 1346 days ago
There's my library for generating og:images statically pretty much dead. I was always wondering why Vercel didn't do this.
2 comments

Well it won't be dead. The vercel one seems to only support running on vercel.
They also have satori, which will run anywhere it seems.
That seems to generate svgs which as far as I know no site will show og embeds with svgs for some reason
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.
I use svgs for my websites og images, haven't come across an issue with embeds on most platforms.
Care to share it? Curious to see your approach
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