Conversion · Next.js (App Router)
What size should an og:image be in Next.js (App Router)
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.
Generate it at the right size at build time with app/opengraph-image.tsx:
import { ImageResponse } from "next/og";
export const size = { width: 1200, height: 630 };
export const contentType = "image/png";
export default function Image() {
return new ImageResponse(
(
<div
style={{
width: "100%",
height: "100%",
display: "flex",
flexDirection: "column",
justifyContent: "center",
padding: 80,
background: "#0b0b12",
color: "#fff",
fontSize: 64,
}}
>
<div style={{ display: "flex" }}>example.com</div>
</div>
),
size
);
}Next emits og:image plus the width and height tags automatically. Two constraints: every element needs an explicit display, and only inline styles work — there is no stylesheet.
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.