Skip to content
Documentation
Rule catalogue

og.image.missing

Provide at least one og:image so links unfurl with a preview

warningper pagevendor-spec

Why it matters

A link pasted into Slack, LinkedIn or iMessage with no image is a grey rectangle of text. The cost is not aesthetic: it is the click that does not happen.

What the finding looks like

The message goflag prints, with example values substituted.

warn og.image.missing Page has no og:image. Link unfurls will fall back to text-only or a random body image.

Add an og:image

Written for the Next.js App Router. The finding is correct on any stack; only the remedy assumes one.

// app/…/page.tsx
export const metadata = {
  openGraph: { images: [{ url: "/og.png", width: 1200, height: 630 }] },
};
// Or generate one per page: app/…/opengraph-image.tsx with ImageResponse.

Says who?

This rule is vendor-spec, and it cites the documentsbelow. Nothing here is goflag’s opinion of what a good page looks like — if you disagree with a finding, this is what you are disagreeing with.