/projects/

O.G. Image

The Real OG

The O.G. Image logo

O.G. image generates Open Graph og:image social preview images from a web page. The source can be anything a web page renders, including handwritten HTML/CSS, React components, etc, and can include anything Chrome supports including pages rendered via client-site JavaScript and webfonts.

It uses puppeteer to spin up a headless Chrome browser in the cloud and take a screenshot.

It runs for free on Vercel, and it even has a howto.

I tweeted about this:

In case it helps anyone else, I did add real documentation to my og:image generator ogimage.micahrl.com
@mrled on Twitter — tweet, archive

Vercel does not recommend this approach, however:

@mrled Hi Micah, we don’t recommend using puppeteer in your Serverless Functions. Vercel is perfect for your frontend and small Serverless Functions that help you get data from external services, but that of course doesn’t mean it’s not possible! – Timothy
@vercel_support on Twitter — tweet, archive