Skip to content

Social & sharing · Next.js (App Router)

How to set up a Twitter card in Next.js (App Router)

X falls back to your Open Graph tags but defaults to the small square layout. Declaring summary_large_image is one line and roughly doubles the visual footprint of every post linking to you. With neither a card nor an og:image, links render as plain text.

The fix for Next.js (App Router)

13x detects your framework from the response and hands you this version rather than the generic one — below 50% confidence it hedges and gives you the generic one instead.

ts code
export const metadata: Metadata = {
  twitter: {
    card: "summary_large_image",
    title: "Your headline",
    description: "One sentence.",
  },
};

On a different stack? The general version of this fix explains what 13x checks and why it matters, without assuming a framework.

Check your Next.js (App Router) site

113 deterministic checks against your live URL, in about 30 seconds. Framework detected from the response, so every fix comes back in the form your stack actually uses.

No signup. Results in 30 seconds.