You're viewing OG Image v6 beta documentation. For stable docs, switch to v5. Release Notes
Getting Started

Install Nuxt OG Image

Last updated by Harlan Wilton in doc: v6 improvements.

Setup Module

Want to know why you might need this module? Check out the introduction.

v6 is currently in beta. Install with the @beta tag. APIs may change before stable release.

To get started with Nuxt OG Image, you need to install the dependency and add it to your Nuxt config.

pnpm add -D nuxt-og-image@beta
Generate an Agent Skill for this package using skilld:
npx skilld add nuxt-og-image

Then add it to your nuxt.config.ts:

nuxt.config.ts
export default defineNuxtConfig({
  modules: [
    'nuxt-og-image',
  ],
})

Inter (400 and 700) is bundled and works out of the box. For custom fonts, see the Custom Fonts guide.

Verifying Installation

Out-of-the-box the module will not do anything until you configure it.

You can verify the module is installed correctly by checking the Nuxt DevTools for the OG Image tab.

The DevTools is the starting point, providing a playground to design and test your OG Image with full HMR support.

Configuration

OG Images must be served with absolute URLs, if you're prerendering, you will need to provide a Site URL.

Site Config Quick Setup
nuxt.config.ts
export default defineNuxtConfig( site: {  url: 'https://example.com',  name: 'My Awesome Website'  }, }) 
.env
NUXT_SITE_URL=https://example.comNUXT_SITE_NAME=My Awesome Website
For more advanced configurations, check out the site config guide .

Install a Renderer

Renderer dependencies are installed separately. We recommend Takumi — it's 2-10x faster than Satori with the same feature set.

# Node.js
pnpm i -D @takumi-rs/core

# Edge runtimes (Cloudflare, Vercel Edge, etc.)
pnpm i -D @takumi-rs/wasm

Running nuxi dev will prompt you to install missing dependencies automatically.

All renderers support Tailwind CSS, UnoCSS, CSS variables, Nuxt UI v3 colors, custom fonts, emoji, and edge runtimes. See the Renderers overview for details.

Next Steps

You've successfully installed Nuxt OG Image, but you need to make your first OG Image.

Follow the Getting Familiar with Nuxt OG Image tutorial to get started.

Did this page help you?