How to generate og:images from text with Canvas

Use the web-standard Canvas API to render text to PNG – without spinning up a whole web browser. Here's how we implemented this approach in @mastrojs/og-image . A few weeks ago, Scott Jehl posted about the pain of generating Open Graph images : those images you link to with an og:image meta tag from your HTML, which are then displayed on social media or messenger apps when somebody shares a link…