Nuxt OG Image uses Satori as the default renderer. It converts Vue components to SVG, then rasterizes to PNG.
# Node.js
pnpm i -D satori @resvg/resvg-js
# Edge runtimes (Cloudflare, Vercel Edge, etc.)
pnpm i -D satori @resvg/resvg-wasm
# Node.js
yarn add -D satori @resvg/resvg-js
# Edge runtimes (Cloudflare, Vercel Edge, etc.)
yarn add -D satori @resvg/resvg-wasm
# Node.js
npm install -D satori @resvg/resvg-js
# Edge runtimes (Cloudflare, Vercel Edge, etc.)
npm install -D satori @resvg/resvg-wasm
It's not necessary to manually define the renderer as satori unless you changed the default.
export default defineNuxtConfig({
// this is not necessary as satori is already the default
ogImage: {
defaults: {
renderer: 'satori'
}
}
})
defineOgImageComponent('MyOgImage', {
renderer: 'satori' // only when the default has been changed
})
It's important to familiarize yourself with Satori before you make more complex templates.
If you find Satori too difficult to work with, you can use Takumi for simpler templates or Chromium for full CSS support.
To learn more about the limitations and working around them, see: