Skip to main content
OwnDocs

OG Images

1 min readStableIntermediate

Every page exposes a 1200×630 PNG generated on demand by the /og route handler using next/og. Page metadata sets the image as the OpenGraph and Twitter card image.

Quick Start

Preview an image directly.

/og?title=Hello&breadcrumb=Demo

Adding Options

Combine the title, breadcrumb, description, and theme parameters.

Plain Text
/og?title=Authentication&breadcrumb=Getting%20Started&description=Set%20up%20JWT%20sessions&theme=dark

Advanced

The title defaults to OwnDocs and truncates to 100 characters. The breadcrumb truncates to 80 and the description to 200. theme accepts light or dark and defaults to light.

Options

titlequeryDefault: OwnDocs

Heading text on the image. Truncated to 100 characters.

breadcrumbquery

Breadcrumb text above the title. Truncated to 80 characters.

descriptionquery

Subtitle below the title. Truncated to 200 characters.

themequeryDefault: light

light or dark.

Was this page helpful?