Blog Content Workflows 8 min read

Facebook and Meta OG Image Fallback Setup Checklist

Fix facebook og image size issues and missing Open Graph images on Facebook and WhatsApp with a deterministic fallback URL strategy.

facebook og image sizeOpen GraphFacebook sharingWhatsApp image previewMeta OG image
Facebook and Meta OG Image Fallback Setup Checklist

Facebook and Instagram display a link preview card when a URL is shared. The card image comes from the og:image meta tag on the page. When that tag is missing, the image URL returns an error, or the image does not meet Facebook's minimum size requirements, the preview renders without an image — a text-only card that generates 3-5× fewer clicks than one with an image.

The facebook og image size requirement is 1200×630 pixels minimum for the large card format. A deterministic fallback URL generated from the page title means every page on your site has a compliant OG image, regardless of whether a designer uploaded one manually.

Requirements

Facebook og image size and format requirements

Facebook's large link preview card requires og:image at 1200×630 pixels or larger at the same 1.91:1 ratio. Images smaller than 600×315 display as a small thumbnail on the left of the link card instead of the large banner format. Images smaller than 200×200 are ignored entirely.

Facebook supports JPEG, PNG, GIF, and WebP. SVG is not supported. Generated SVG placeholder images must be converted to raster format for Facebook. The fallback.pics API returns PNG or JPEG by specifying the format in the URL or via the Accept header. Use .png or .jpg extension to force a specific format.

Facebook's scraper follows up to one redirect. If your og:image URL redirects to a different URL, the scraper follows it. If it redirects again, the scraper gives up. Avoid redirect chains in your og:image URLs.

Large card

1200×630 px minimum. Displayed as full-width banner above the link text.

Small thumbnail

600×315 to 1199×629 px. Displayed as a small left-aligned thumbnail.

Ignored

Below 200×200 px. No image is shown in the link preview.

Meta tags

The complete OG image meta tag set for Facebook compliance

Facebook reads og:image, og:image:url, og:image:width, og:image:height, og:image:alt, og:image:type, and og:image:secure_url. Only og:image is strictly required, but providing width and height lets Facebook display the large card format immediately without fetching the image to determine dimensions.

og:image:secure_url must be an HTTPS URL. If you provide an HTTP URL in og:image, Facebook will accept it but the secure_url fallback is used for HTTPS pages. Always use HTTPS for og:image URLs in 2026.

Implementation text
<!-- Complete OG meta tag set for Facebook, WhatsApp, Instagram -->
<meta property="og:type" content="article" />
<meta property="og:title" content="How to Optimize Lighthouse CI in Monorepos" />
<meta property="og:description" content="A practical guide to running Lighthouse CI..." />
<meta property="og:url" content="https://example.com/blog/lighthouse-ci-monorepos" />

<!-- Primary OG image: use real image URL or fallback -->
<meta property="og:image"
  content="https://fallback.pics/api/v1/thumbnail/1200x630.png
    ?text=How+to+Optimize+Lighthouse+CI+in+Monorepos
    &theme=purple&style=soft&label=example.com" />
<meta property="og:image:secure_url"
  content="https://fallback.pics/api/v1/thumbnail/1200x630.png
    ?text=How+to+Optimize+Lighthouse+CI+in+Monorepos
    &theme=purple&style=soft&label=example.com" />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />
<meta property="og:image:alt" content="Article: How to Optimize Lighthouse CI in Monorepos" />
<meta property="og:image:type" content="image/png" />

Debugger

Testing with Facebook Sharing Debugger and clearing the cache

Facebook's Sharing Debugger at developers.facebook.com/tools/debug/ fetches your page and shows exactly what the scraper found, including the resolved og:image URL, its dimensions, and any errors. Paste the page URL and click Debug. If the image is missing or the wrong size, the debugger explains why.

Facebook caches og:image for a period after the first scrape. When you update the image URL, use the 'Scrape Again' button in the Sharing Debugger to force a fresh fetch. The cache clears for subsequent organic shares after the re-scrape, but users who shared the link before the re-scrape will see the old cached image.

The debugger also validates og:image for Instagram and WhatsApp sharing, since all three use the same Open Graph protocol. Clearing the Facebook cache clears the preview for all Meta platforms.

Site-wide implementation

Generating fallback OG images for every page automatically

Add the og:image generation logic to your site's layout template or metadata component. Pages that have a manually uploaded image use that URL. Pages without one generate a fallback.pics URL from the page title and category. This requires zero per-page work from content contributors.

For static sites generated at build time, compute the fallback URL during the build and embed it as a static meta tag. This avoids any runtime URL generation and means the OG image is present in the initial HTML for all crawlers.

Implementation tsx
// Astro layout — auto-generate og:image if not provided
---
const { title, ogImage, category = 'Article' } = Astro.props;
const resolvedOgImage = ogImage ??
  `https://fallback.pics/api/v1/thumbnail/1200x630.png` +
  `?text=${encodeURIComponent(title)}` +
  `&label=${encodeURIComponent(category)}` +
  `&theme=purple&style=soft`;
---
<meta property="og:image" content={resolvedOgImage} />
<meta property="og:image:width" content="1200" />
<meta property="og:image:height" content="630" />

Key takeaways

What to standardize before shipping

  • Facebook requires 1200×630 px for large link preview cards; below 600×315 only a small thumbnail shows.
  • Provide og:image:width and og:image:height so Facebook displays the large card without fetching image dimensions.
  • Facebook does not support SVG — use .png or .jpg format parameters in your fallback.pics URL.
  • Use the Facebook Sharing Debugger to validate og:image and clear the cached preview after updates.
  • Implement fallback URL generation in your layout template so every page has a compliant OG image automatically.

Production fallback layer

Use fallback.pics anywhere an image URL is accepted.

Start with one deterministic URL and standardize fallback behavior across your design system.

Read the docs