Skip to content

Social images autogenration

aka open graph β†— images, x/twitter card β†— images

Options

Basic idea is to create HTML or SVG β€œimage” for page based on metadata, like title, description, tags etc. And then convert it to raster image. There are several options:

Satori

CanvasKit

Installation

Full instruction for Astro OG Canvas β†—

Further improvements

Current implementation looks boring. Maybe I can:

  • generate gradient based on tag colors
  • Some pages have β€œcover” images. Can I use it in social images? Though in my case all of them are SVGs
  • It seems, Astro OG Canvas doesn’t support emojis
  • add logo