Vercel

Introducing OG Image Generation: Fast, dynamic social card images at the Edge

Oct 10, 2022
Introducing OG Image Generation: Fast, dynamic social card images at the Edge
SummaryAI, from the source post

Introduced Vercel OG Image Generation, a new library (`@vercel/og`) for generating dynamic social card images using Edge Functions and WebAssembly. This approach is 5x faster than previous Serverless Function-based solutions by avoiding headless browsers and leveraging a lightweight core engine (Satori). It supports HTML/CSS, Tailwind CSS, and dynamic asset fetching, with automatic Edge caching. The post details the technical challenges of the previous approach (size, speed, cost) and the benefits of the new Edge-based solution, including performance metrics and code examples.

More from the Edge Runtime trail