og-image-generation

Generate dynamic social preview images with Next.js and next/og.

20|3|Updated Nov 30, 2025
One-click install
npx skills add https://github.com/andrelandgraf/fullstackrecipes --skill og-image-generation
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: og-image-generation
Source: https://github.com/andrelandgraf/fullstackrecipes/tree/main/templates/fullstackrecipe/.agents/skills/og-image-generation
Command: npx skills add https://github.com/andrelandgraf/fullstackrecipes --skill og-image-generation

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Generate dynamic social preview images for links and pages, enabling consistent, branded visuals without manual image creation.

Core Features & Use Cases

  • Server-rendered images using Next.js file conventions and the next/og library.
  • Built-in caching of rendered images at build time for fast delivery.
  • Use Case: Create share-ready previews for articles, products, and campaigns with minimal setup.

Quick Start

Install and configure Next.js with next/og, then run the build to generate and cache your og images.

Frequently Asked Questions about og-image-generation

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate dynamic social preview images in a Next.js application?

You can generate dynamic social preview images in Next.js by using the next/og library alongside Next.js file conventions to server-render branded visuals. This approach eliminates manual image creation for articles, products, and campaigns.

Do I need a specific environment to use next/og for build time rendering?

Yes, using next/og for build time rendering requires a Next.js environment. After installing and configuring the library, running your build generates and caches the social preview images for fast delivery across your pages.

How does build caching work for Next.js OG images?

Build caching for Next.js OG images works by rendering and storing the visuals at build time. This built-in caching mechanism ensures fast delivery of your dynamic social previews without regenerating images on every request.

What is the best way to automate branded OG image creation for multiple campaigns?

The best way to automate branded OG image creation is to use server-side rendering with the next/og library in Next.js. This method automatically generates consistent, branded visuals across multiple pages and campaigns with minimal setup.

Can I use this server-side rendering approach for social previews without manual image creation?

Yes, you can use this server-side rendering approach to automatically generate social previews without manual image creation. By utilizing Next.js and next/og, you enable consistent, branded visuals dynamically for all your web content.