Skip to content
Quasar Tools Logo

WhatsApp Link Preview Open Graph Tags: Complete Guide

Everything you need to know about WhatsApp link preview Open Graph tags — og:title, og:description, og:image requirements, absolute URLs, cache busting, and how to test your previews.

DH
Tutorials & How-Tos14 min read3,200 words

When you share a link on WhatsApp, the app fetches your page, reads a handful of meta tags from the HTML, and assembles a preview card — title, description, and image — before the recipient even taps the link. Get those tags wrong and the preview silently disappears. This guide covers exactly which Open Graph tags WhatsApp reads, why og:image must use an absolute URL, what image dimensions actually work, and how to test and fix previews before you hit send.

4Required OG tagsog:title, og:description, og:image, og:url
1200×630Recommended image sizepx, 1.91:1 aspect ratio
100%Absolute URL requiredfor og:image — relative paths silently fail

The four essential OG tags

WhatsApp needs four meta tags to build a complete link preview. Every other OG tag is optional or supplementary. If any of these four is missing, the preview will either be incomplete or not appear at all.

  • og:title — The headline of the preview card. Should be concise — 60 to 90 characters is ideal. Longer titles get truncated on small screens.
  • og:description — The supporting text shown beneath the title. Aim for 150 to 200 characters. WhatsApp typically shows 1–2 lines on mobile.
  • og:image — The image displayed in the preview. Must be an absolute URL (see the next section for full requirements).
  • og:url — The canonical URL of the page being shared. Helps WhatsApp understand the definitive location of the content.

Here is what a correctly structured `<head>` section looks like with all four tags:

Tip

```html```

Beyond the four essentials, a handful of additional OG tags improve how your previews render and give crawlers more context to work with:

TagValue exampleWhy it helps
og:type"website" or "article"Signals content type; articles show publish dates on some platforms
og:site_name"Quasar Tools"Appears as a sub-label under the title on some platforms
og:image:width"1200"Allows layout before image loads — prevents preview skipping
og:image:height"630"Pair with og:image:width for best results
og:image:alt"Description of the image"Accessibility; also used by screen readers in rich previews
og:image:type"image/jpeg"Explicit MIME type; helps crawlers avoid unknown format errors
og:locale"en_US"Declares the language/region of the page content

OG Tag Validator

Paste your page URL or raw HTML and instantly check whether all your Open Graph tags are present, correctly formed, and ready for WhatsApp.

Open tool

og:image absolute URL requirement

This is the single most common cause of broken WhatsApp previews: a relative path in the `og:image` tag. The Open Graph protocol specification is unambiguous about this — `og:image` must be a full absolute URL. Not a root-relative path, not a protocol-relative URL, not a path fragment. A complete URL with scheme, domain, and path.

FormatExampleWorks in WhatsApp?
✓ Absolute URL (correct)https://yourdomain.com/images/share.jpg✓ Yes
✗ Root-relative path/images/share.jpg✗ No — silently fails
✗ Protocol-relative URL//yourdomain.com/images/share.jpg✗ Unreliable
✗ Relative pathimages/share.jpg✗ No
✗ Data URIdata:image/jpeg;base64,...✗ No

Structured properties can be specified by putting a colon after the property name and using another `og:image` tag with an absolute URL.

Open Graph Protocol specification (ogp.me)

Why relative paths fail silently

When WhatsApp's crawler fetches your page, it parses the HTML in isolation — it does not "know" your base URL the same way a browser does. A relative path like `/images/share.jpg` has no context, so the crawler either ignores it or attempts to resolve it against a base URL it may not have correctly inferred. The result is a missing image with no error message — the preview either appears without an image or doesn't appear at all.

Always use the full absolute URL including `https://`. If your site supports both HTTP and HTTPS, always use `https://` — many social crawlers refuse to load non-HTTPS images in previews for security reasons.

Warning

Even if your page is served over HTTPS, if `og:image` points to an HTTP URL (without the S), WhatsApp may refuse to load it. Mixed-content blocking applies in many crawler environments. Always use `https://` in your `og:image` value.

CDN and third-party image hosts

If your images are served from a CDN or a third-party host (like Cloudinary, Imgix, or a cloud storage bucket), the absolute URL requirement still applies — just use the CDN's full URL. The only additional consideration is CORS headers: make sure your CDN allows cross-origin requests, since some crawlers check this. Also verify that the CDN URL doesn't have authentication tokens that expire — a time-limited signed URL will break previews for anyone clicking the link after the token expires.

Open Graph Preview Text Optimizer

Check whether your og:title and og:description lengths are optimized for WhatsApp, Facebook, LinkedIn, and Twitter simultaneously.

Open tool

og:image size and format rules

Getting the image URL right is only half the battle. WhatsApp also has size and format requirements that determine whether the image is displayed prominently or skipped entirely.

The Open Graph spec recommends 1200×630 pixels at a 1.91:1 aspect ratio. This is the target that renders well across WhatsApp, Facebook, LinkedIn, and Slack simultaneously, so there is no reason not to use it as your default.

PlatformMinimum sizeRecommended sizeAspect ratio
WhatsApp300×200 px1200×630 px1.91:1
Facebook200×200 px1200×630 px1.91:1
LinkedIn200×200 px1200×630 px1.91:1 or 1:1
Twitter/X280×150 px1200×628 px2:1 (summary_large_image)
Slack500×300 px1200×630 px1.91:1

WhatsApp will display images down to around 300×200 pixels, but anything smaller tends to be rendered as a tiny thumbnail rather than a prominent image, and very small images may be omitted entirely. Images below the minimum threshold or with extreme aspect ratios (very tall portrait images, for example) are sometimes rejected.

Supported file formats

  • JPEG (.jpg, .jpeg) — Best choice for photographs and images with gradients. Widely supported by all social crawlers.
  • PNG (.png) — Best choice for graphics, logos, and images with transparency. Also universally supported.
  • WebP — Mixed crawler support. Avoid using WebP for og:image even if your site otherwise uses WebP images.
  • GIF — Widely supported but only the first frame is shown (no animation). Rarely ideal for preview images.
  • SVG — Not supported by most social crawlers including WhatsApp. Use a rasterised PNG or JPEG instead.

File size considerations

Keep your `og:image` file under 300 KB. WhatsApp's crawler runs on Meta's servers and is optimised for speed — very large images take longer to fetch and increase the chance of a timeout, resulting in a preview with no image. A well-optimised JPEG at 1200×630 px should comfortably fit under 200 KB.

Tip

Use the [Image Resizer](/tools/image/utilities/image-resizer) to scale your preview image to exactly 1200×630 px, then run it through the [JPEG/PNG compressor](/tools/image/compressors) to reduce file size before uploading to your server. Both operations happen entirely in your browser — nothing is uploaded anywhere.

Common reasons previews break

Even with correct OG tags in place, WhatsApp link previews sometimes fail to render. These are the most frequent causes.

1

Relative og:image URL

Already covered above, but worth repeating because it's the most common mistake. Always use `https://yourdomain.com/path/to/image.jpg` — never `/path/to/image.jpg`. Use the OG Tag Validator to catch this before sharing.

2

OG tags rendered by JavaScript (not in server-rendered HTML)

WhatsApp's crawler does not execute JavaScript. If your meta tags are injected by a client-side framework after the page loads — common in single-page applications built with React, Vue, or Angular without server-side rendering — the crawler will see an empty `<head>` and generate no preview. OG tags must be present in the initial HTML response from the server. Use server-side rendering (SSR) or static site generation (SSG) to ensure the tags are in the raw HTML.

3

Server blocking the WhatsApp crawler

Security tools like Cloudflare's Bot Fight Mode, custom WAF rules, or aggressive robots.txt configurations sometimes block the WhatsApp crawler. Check your `robots.txt` to ensure it isn't blocking all crawlers with `User-agent: * Disallow: /`. Also check your server's security logs when testing — you may find the crawler being blocked with a 403 or 429 status.

4

og:image returns a non-200 status

If the image URL returns a 404, 403, 301 redirect, or any non-200 response, WhatsApp silently drops the image from the preview. Verify that your image URL is directly accessible (no redirects, no authentication required) by opening it in a private browser window and checking the status. Use the HTTP Headers Inspector to check the response headers for any image URL.

5

og:image hosted on HTTP (not HTTPS)

Social crawlers typically enforce HTTPS for security. An image served over plain HTTP will often be skipped even if the rest of your page is HTTPS. Always ensure your `og:image` URL starts with `https://`.

6

og:image exceeds the size limit or has an invalid format

Very large images (over 5 MB) or unsupported formats (SVG, WebP in some crawlers) are silently skipped. Stick to JPEG or PNG under 300 KB at 1200×630 px.

Warning

The trickiest debugging scenario is when OG tags are correct but the preview still doesn't appear — this is almost always caused by a stale cache. Before concluding there is a technical problem, try the cache-busting method described in the next section.

Cache-busting WhatsApp previews

WhatsApp caches link previews per URL. Once a URL has been crawled, the same preview is served to all recipients who receive that link — regardless of whether you've updated the OG tags since. The cache lifetime is not publicly documented, but in practice it can persist for several days to a week.

The query string method

The most reliable workaround is to append a query string to the URL when you share it. WhatsApp treats `https://yourdomain.com/page?v=2` as a distinct URL from `https://yourdomain.com/page`, so it will re-crawl the page fresh and generate a new preview. The query string can be anything — `?v=2`, `?ref=wa`, `?share=1` — as long as it's different from what was shared before.

Tip

If you're regularly updating content and sharing links, use a consistent versioning scheme: `?v=1`, `?v=2`, `?v=3`, etc. Make sure your analytics tool (if you're using UTM parameters) strips or normalises the version parameter, or use a dedicated parameter that doesn't conflict with your tracking setup. The [UTM Builder](/tools/data/validators/utm-builder-with-naming-rules) can help you structure shareable URLs cleanly.

Using Facebook's Sharing Debugger to warm the cache

Facebook's Sharing Debugger (developers.facebook.com/tools/debug) is a tool that both validates your OG tags and forces a re-scrape of your URL on Meta's infrastructure. Since WhatsApp and Facebook share the same Open Graph infrastructure under Meta, scraping via the Sharing Debugger can sometimes prime (or clear) the WhatsApp preview cache for the same URL. It's worth running after any tag change alongside the query string method.


Summary: cache-busting workflow

  1. Update your OG tags on the server and verify the raw HTML response contains the new values.
  2. Run your URL through the OG Tag Validator to confirm the tags are correct.
  3. Submit the URL to Facebook's Sharing Debugger to force a re-scrape.
  4. When sharing on WhatsApp, append a new query string (e.g., `?v=2`) to ensure a fresh crawl.

Testing your OG tags

You should validate your Open Graph implementation before sharing any link at scale. A broken preview on a marketing campaign or product announcement is hard to fix after the fact — the cached broken version will persist in all the chats where the original link was already shared.

Method 1: OG Tag Validator (fastest)

The OG Tag Validator lets you paste a URL or raw HTML and instantly checks all your Open Graph tags — whether they're present, whether `og:image` is an absolute HTTPS URL, whether character lengths are within recommended ranges, and whether supporting tags like `og:image:width` are included. It also generates a visual preview card so you can see exactly how the preview will appear before sharing. No signup, no browser extension — just paste and validate.

OG Tag Validator

Check all your Open Graph meta tags instantly — absolute URL detection, character length checks, and a visual preview card in one place.

Open tool

Method 2: View source and inspect manually

For a quick manual check, open your page URL in a browser, right-click, and select "View Page Source". Search for `og:image` in the raw HTML. Confirm:

  • The tag is inside `&lt;head&gt;`, not `&lt;body&gt;`.
  • The `content` attribute contains a full absolute HTTPS URL.
  • The URL is publicly accessible (test it by opening it in a new private tab).
  • There are no typos in the property name (`og:image`, not `og_image` or `og:img`).

Method 3: Facebook Sharing Debugger

Facebook's Sharing Debugger (developers.facebook.com/tools/debug) is the authoritative validation tool for Open Graph tags — since WhatsApp uses the same infrastructure, a clean result here is the strongest signal your tags will work correctly on WhatsApp too. The tool shows exactly what the crawler read, highlights warnings, and lets you force a re-scrape.

Method 4: LinkedIn Post Inspector

LinkedIn's Post Inspector (linkedin.com/post-inspector) serves a similar purpose for the LinkedIn crawler. Since LinkedIn also follows the Open Graph spec, a clean LinkedIn result strongly correlates with correct WhatsApp behaviour. It also triggers a LinkedIn cache refresh for the URL.

What about the Twitter Card Validator?

Twitter/X has its own `twitter:card` meta tags, which take priority over OG tags on Twitter. However, Twitter falls back to OG tags when Twitter Card tags are absent — so validating your OG tags is a prerequisite even if you add Twitter Card tags on top. Use the Twitter Card Validator to check both simultaneously and ensure cross-platform coverage.

Twitter Card Validator

Validate Twitter Card and Open Graph tags side by side — useful for ensuring WhatsApp previews and Twitter previews both work correctly.

Open tool

Advanced OG tag patterns

Once you have the basics working, a few advanced patterns give you more control over how your content appears on WhatsApp and other social platforms.

Multiple og:image tags

The Open Graph spec allows multiple `og:image` tags on a single page. Each additional image tag is treated as an alternative — crawlers typically use the first valid image they encounter. This is useful for providing a fallback:

html
<!-- Primary: large landscape (WhatsApp, Facebook, LinkedIn) -->
<meta property="og:image"        content="https://yourdomain.com/share-1200x630.jpg" />
<meta property="og:image:width"  content="1200" />
<meta property="og:image:height" content="630" />
<!-- Fallback: square (some LinkedIn contexts, Instagram) -->
<meta property="og:image"        content="https://yourdomain.com/share-1200x1200.jpg" />
<meta property="og:image:width"  content="1200" />
<meta property="og:image:height" content="1200" />

Using og:image separately from twitter:image

Twitter/X reads `twitter:image` first and only falls back to `og:image` if no Twitter Card tags are present. This means you can specify a different image for Twitter without affecting WhatsApp. Twitter's recommended image size for a `summary_large_image` card is 1200×628 px (2:1 ratio) rather than 1200×630 px. The difference is small, but if you want pixel-perfect rendering on both platforms, specify both:

html
<!-- Used by WhatsApp, Facebook, LinkedIn, Slack -->
<meta property="og:image"        content="https://yourdomain.com/share-1200x630.jpg" />
<!-- Used by Twitter/X specifically -->
<meta name="twitter:card"        content="summary_large_image" />
<meta name="twitter:image"       content="https://yourdomain.com/share-1200x628.jpg" />

Dynamic OG images

Many modern sites generate OG images dynamically — for blog posts, product pages, or user profiles — using services or server-side rendering. If you're generating images programmatically, remember that the URL must still be absolute and publicly accessible. Dynamic OG image URLs often look like: `https://yourdomain.com/api/og?title=My+Post+Title` — this is perfectly valid as long as the endpoint returns an actual image with the correct `Content-Type` header (`image/jpeg` or `image/png`), not an HTML page.

Validating structured data alongside OG tags

Open Graph tags work alongside (not instead of) JSON-LD structured data. For articles, products, and local businesses, structured data enables Google rich results while OG tags handle social sharing previews. The two systems are complementary — you need both. Use the Structured Data Validator to check your JSON-LD schema while the OG Tag Validator handles your Open Graph implementation. The Meta Tag Generator can produce a complete `<head>` section with both OG tags and Twitter Card tags in one output.


For reference, here is a complete, production-ready `<head>` section covering Open Graph (WhatsApp, Facebook, LinkedIn), Twitter Card, and standard SEO meta tags:

html
<head>
  <!-- Standard SEO -->
  <title>Your Page Title | Site Name</title>
  <meta name="description" content="A concise 150-160 character page description." />
  <link rel="canonical"    href="https://yourdomain.com/your-page" />

  <!-- Open Graph (WhatsApp, Facebook, LinkedIn, Slack) -->
  <meta property="og:type"         content="website" />
  <meta property="og:url"          content="https://yourdomain.com/your-page" />
  <meta property="og:title"        content="Your Page Title" />
  <meta property="og:description"  content="A concise summary for social sharing." />
  <meta property="og:image"        content="https://yourdomain.com/images/share-1200x630.jpg" />
  <meta property="og:image:width"  content="1200" />
  <meta property="og:image:height" content="630" />
  <meta property="og:image:alt"    content="Descriptive alt text for the preview image." />
  <meta property="og:site_name"    content="Your Site Name" />
  <meta property="og:locale"       content="en_US" />

  <!-- Twitter Card (Twitter/X) -->
  <meta name="twitter:card"        content="summary_large_image" />
  <meta name="twitter:title"       content="Your Page Title" />
  <meta name="twitter:description" content="A concise summary for Twitter." />
  <meta name="twitter:image"       content="https://yourdomain.com/images/share-1200x628.jpg" />
</head>

Meta Tag Generator

Generate a complete set of Open Graph, Twitter Card, and SEO meta tags in one go — no manual writing required.

Open tool

Key takeaways

  • WhatsApp reads four Open Graph tags to build a link preview: og:title, og:description, og:image, and og:url.
  • og:image must be a full absolute HTTPS URL — relative paths silently fail in WhatsApp and all other social crawlers.
  • Use 1200×630 px JPEG or PNG under 300 KB as your og:image for best cross-platform rendering.
  • Include og:image:width and og:image:height tags so crawlers can lay out the preview before the image loads.
  • OG tags must be in the server-rendered HTML — JavaScript-injected meta tags are not read by WhatsApp.
  • WhatsApp caches previews per URL for days. Append a query string (?v=2) when sharing an updated link.
  • Use the OG Tag Validator to check all tags before sharing, and Facebook's Sharing Debugger to force a re-scrape after changes.

Frequently Asked Questions

Yes. WhatsApp's link preview crawler reads the standard Open Graph protocol meta tags from your page's <head> section — specifically og:title, og:description, og:image, and og:url. If these tags are missing or malformed, WhatsApp will either show no preview or generate a plain-text fallback with just the URL.

Yes. The Open Graph protocol specification explicitly requires that og:image be a full absolute URL, including the protocol (https://) and domain. Relative paths like /images/share.jpg will not work in WhatsApp or any other social crawler. Always use the full URL: https://yourdomain.com/images/share.jpg.

The Open Graph specification recommends 1200×630 pixels at a 1.91:1 aspect ratio. WhatsApp will display images down to around 300×200 px, but anything smaller risks being shown as a tiny thumbnail or skipped entirely. For the best rendering across WhatsApp, Facebook, and LinkedIn simultaneously, 1200×630 px is the safe target.

WhatsApp caches link previews aggressively — sometimes for several days. To force a re-fetch, append a query string to your URL when sharing (e.g., https://yourdomain.com/page?v=2). The new URL is treated as a different URL and WhatsApp will crawl it fresh. You can also use Facebook's Sharing Debugger or LinkedIn Post Inspector to trigger a re-scrape, which sometimes primes the cache for WhatsApp too.

Not directly — og:image is read by all social crawlers. You can use multiple og:image tags in sequence; the spec says crawlers may use the first one, but behaviour varies. Twitter Card's twitter:image tag is read separately by Twitter/X, so you can specify a different image there. For WhatsApp vs. Facebook specifically, there is no official mechanism to serve different images since both use the Open Graph protocol.

Yes, and it's worth including them. When you specify og:image:width and og:image:height, crawlers can lay out the preview without waiting for the image to fully download. This can prevent previews from being skipped on slow connections. Always pair them with your og:image tag.

JPEG and PNG are the safest choices — both are universally supported by WhatsApp and all other social crawlers. WebP has inconsistent support in social crawlers even if the receiving device supports it. Avoid SVG and GIF for og:image as neither is reliably rendered.

ShareXLinkedIn

Related articles