How to fix missing og image on Next.js
Add an og:image meta tag to every page so that social media platforms and messaging apps display a rich, branded image preview whenever someone shares your store's link.
Steps for Next.js
- Create a default fallback OG image (e.g. 1200×630 px) and place it at /public/og-default.jpg so Next.js can serve it as a static asset.
- In app/layout.tsx, export a root `metadata` object with an `openGraph.images` array that points to the default image — this acts as the site-wide fallback for every page that does not override it.
- For static pages (e.g. app/about/page.tsx), export their own `metadata` object with a page-specific `openGraph.images` entry to override the root fallback.
- For dynamic pages (e.g. app/products/[slug]/page.tsx), export an async `generateMetadata()` function that fetches the product data and returns the product's image URL in `openGraph.images`; fall back to the default image when no product image is available.
- Ensure every image entry includes `url`, `width`, `height`, and `alt` fields — these are required by the Open Graph spec and improve how platforms render the preview.
- Verify the tags are rendered correctly by running `next build && next start` and inspecting the page `<head>` with curl or browser DevTools, then validate with the Meta Sharing Debugger (developers.facebook.com/tools/debug) or opengraph.xyz.
What is missing og image?
The og:image tag is a small snippet of HTML code placed in the invisible "head" section of your web pages. It tells social networks (Facebook, LinkedIn, Pinterest, X/Twitter, iMessage, WhatsApp, Slack, and more) which image to show when someone shares or previews a link to your page. Without it, those platforms either show no image at all, pick one randomly from your page (often a logo, icon, or a totally irrelevant graphic), or display a plain grey box — all of which look unprofessional and untrustworthy. The Open Graph protocol (the "og:" prefix) is a widely adopted web standard originally created by Facebook and now used by virtually every major platform.
When a customer shares your product page in a Facebook group, on Pinterest, or in a WhatsApp message, the link preview is often the first visual impression a new potential buyer gets — before they ever visit your site. A missing or broken og:image means that preview is blank, random, or ugly, dramatically reducing click-through rates and undermining trust in your brand. Studies consistently show that posts with compelling images receive far more clicks, shares, and engagement than text-only links. For ecommerce stores especially, a crisp product image in a shared link can directly drive impulse purchases and word-of-mouth traffic at zero extra ad spend. There is also a secondary SEO benefit: platforms like Pinterest drive significant referral traffic, and proper og:image tagging is required for Rich Pins, which surface your product price and availability alongside the image.
See the complete Missing og image guide for every platform and the full background.
Not sure if your Next.js store has this?
Run a free SEOLZ scan — we’ll find missing og image and every other issue across your whole site.
Scan my site free