All rules
critical
Rule: og-imageWeight: 8/100

Rule: og-image

When someone shares your page on Twitter, LinkedIn, Slack, or Discord, the og:image is the large visual preview that makes people click. Without it, your link shows a blank card or a generic placeholder — a clear signal of a broken or amateur site. At weight 8/100, this is the heaviest critical rule in Indxel and the most impactful for social traffic.

Run the check
$ npx indxel check
Look for og-image in the output

What it checks

Indxel looks for a <meta property="og:image" content="..."> tag in the page's HTML head. The rule passes if the tag exists AND the content attribute is a non-empty string. Indxel does not validate that the image URL resolves to an actual image (that would require HTTP requests during scanning). It only checks that the tag is present with a value.

Thresholds

PASS

og:image meta tag exists with a non-empty content value

ERROR

og:image meta tag is missing or has an empty content value

Edge cases

1

Relative og:image URLs (e.g., /og.png) are valid HTML but some social platforms require absolute URLs. Indxel passes relative URLs but best practice is absolute (https://example.com/og.png).

2

Next.js opengraph-image.tsx file convention generates the og:image tag automatically. Indxel detects the resulting meta tag in the rendered HTML.

3

If your layout sets a default og:image and your page also sets one, the page-level image overrides the layout image. Indxel sees only the final rendered tag.

4

Data URIs (data:image/png;base64,...) technically pass the rule but are not recommended — they bloat the HTML and some platforms don't support them.

5

Indxel does NOT verify the image dimensions, format, or that the URL returns a 200 response. It checks presence only. Use og:image:width and og:image:height for dimension hints.

Configuration

indxel.config.ts
// indxel.config.ts
import { defineSEO } from "indxel";

export default defineSEO({
  rules: {
    "og-image": true, // enabled by default (critical)
  },
});

// Set a default OG image in your root layout:
// app/layout.tsx
export const metadata = {
  openGraph: {
    images: [{
      url: "https://example.com/og-default.png",
      width: 1200,
      height: 630,
      alt: "Site name — tagline",
    }],
  },
};

Frequently asked questions

Does Indxel verify the og:image URL actually works?

No. Indxel checks that the meta tag exists and has a non-empty value. Validating the image URL would require HTTP requests during scanning, which is outside the scope of static analysis. Use a social preview debugger to verify the image loads.

What are the recommended og:image dimensions?

1200x630 pixels (1.91:1 ratio). This works across Facebook, Twitter, LinkedIn, and Slack. Use PNG or WebP format. Keep file size under 1MB for fast loading in social previews.

Can I use the same og:image for all pages?

A single default image is better than no image. But unique og:images per page significantly increase social engagement. Use Next.js opengraph-image.tsx for dynamic generation.

Related rules

og-title

optional — 4/100

og-description

optional — 4/100

twitter-card

optional — 4/100

Validate your SEO now

$npx indxel check
Get startedBrowse all rules
Indxel

SEO validation that runs in your terminal and blocks bad deploys.

GitHubnpm

Product

  • Documentation
  • Pricing
  • Plus Plan
  • CI/CD Guard
  • Indexation
  • Free Tools
  • Blog

Comparisons

  • vs Semrush
  • vs Ahrefs
  • vs Moz
  • vs Screaming Frog
  • All comparisons

Integrations

  • Vercel
  • GitHub Actions
  • Netlify
  • Docker
  • All integrations

Resources

  • Frameworks & use cases
  • Next.js
  • For freelancers
  • For agencies
  • SEO Glossary

Built with care. MIT Licensed.

PrivacyTermsLegalContact