Skip to content

Social images autogeneration

Aka Open Graph ↗ images and X/Twitter Card ↗ images.

The basic idea is to create an HTML or SVG “image” for a page based on metadata, such as title, description, tags, etc. Then, convert it to a raster image. There are several options:

Full instructions for Astro OG Canvas ↗

The current implementation looks boring. Maybe I can:

  • Generate a gradient based on tag colors
  • Use “cover” images from some pages in social images, although all of them are SVGs
  • It seems that Astro OG Canvas doesn’t support emojis
  • Add a logo