social warning social/og-image

OG Image SEO Rule

Validate Open Graph images for proper accessibility, dimensions, file size, and format

What This Rule Checks

Validates og:image meta tags: checks URL accessibility, verifies image content type, warns about files over 8MB, checks og:image:width/height for 1200x630px dimensions, and validates aspect ratio (1.91:1).

Why It Matters for SEO & GEO

The og:image controls how your page appears when shared on social media. Missing or broken images result in text-only previews that get significantly fewer clicks and shares.

How to Fix

Add an og:image meta tag pointing to an accessible image URL. Use 1200x630px dimensions (1.91:1 aspect ratio). Keep file size under 8MB. Add og:image:width and og:image:height tags.

Examples

Bad

<meta property="og:image" content="/local-path.jpg">

Good

<meta property="og:image" content="https://example.com/og-image.jpg"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630">

How VibeLinter Checks OG Images

VibeLinter’s social/og-image rule performs these checks:

  1. Existence — Warns when no og:image meta tag is found
  2. Empty content — Errors when og:image tag has no content attribute
  3. URL resolution — Resolves relative URLs to absolute URLs based on the page URL
  4. HTTP accessibility — Makes HEAD requests to verify the image is reachable (with 10-second timeout and up to 5 redirects)
  5. Content type validation — Errors when the resource is not an image type
  6. File size check — Warns when the og:image exceeds 8MB
  7. Dimension validation — When og:image:width and og:image:height tags are present, checks for minimum 1200x630px and optimal aspect ratio (1.5-2.2 range)
  8. Missing dimensions — Suggests adding og:image:width and og:image:height when absent
  9. Network error handling — Provides specific messages for DNS failures, HTTP errors, and timeouts

Configuration

// vibelinter.config.cjs
module.exports = {
  rules: {
    'social/og-image': {
      enabled: true,
      severity: 'warning'
    }
  }
}

SEO Impact

Optimized OG images affect:

  • Social click-through rates — Posts with compelling images get 2-3x more engagement than text-only shares
  • Brand consistency — Custom OG images reinforce brand identity across social platforms
  • Content virality — Visually appealing previews encourage more sharing and backlinks
  • GEO (Generative Engine Optimization) — AI search interfaces increasingly display visual previews; properly sized og:images ensure your content looks professional in AI-powered search results and social citations

Related SEO Topics

OG image optimizationsocial share image SEOOpen Graph image sizeog:image validationsocial media preview imageog:image dimensions 1200x630

Related Rules

References