---
title: "Docusaurus: Workaround for WhatsApp Open Graph Image Bug"
url: https://daily.dev/posts/docusaurus-workaround-for-whatsapp-open-graph-image-bug-c9tqizl4i
source_url: https://johnnyreilly.com/docusaurus-workaround-whatsapp-open-graph-image-bug
type: article
source: "John Reilly"
published: 2026-08-21T10:09:26.102Z
updated: 2026-08-21T10:09:49.491Z
tags: ["docusaurus"]
reading_time: 3
upvotes: 4
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Docusaurus: Workaround for WhatsApp Open Graph Image Bug

**[John Reilly](https://daily.dev/sources/johnnyreilly)** · 3 min read · 4 upvotes · 0 comments

## Summary

Docusaurus's newer 'Faster' build mode uses an SWC-based HTML minifier that strips quotes from HTML attributes, including og:image. While technically valid HTML, WhatsApp's link-preview parser fails on unquoted attributes and renders previews without an image. The fix is setting swcHtmlMinimizer: false in the Docusaurus config to fall back to the old html-minifier-terser, which preserves quotes, at the cost of some build speed. The issue has been reported to both Docusaurus and WhatsApp with no resolution yet.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://johnnyreilly.com/docusaurus-workaround-whatsapp-open-graph-image-bug>

## Questions this post answers

### Why is my og:image preview missing when I share my Docusaurus site link on WhatsApp?

WhatsApp's link-preview parser fails to render the image when the og:image meta tag's attribute values are unquoted. This happens because Docusaurus's Faster build mode (enabled via future.v4: true) uses an SWC-based HTML minifier that aggressively strips quotes from HTML attributes, producing tags like <meta property=og:image content=... />, which is valid HTML but breaks WhatsApp specifically.

_daily.dev surfaces fixes like this for developers debugging social preview issues across static site generators._

### How do I fix WhatsApp not showing og:image previews for my Docusaurus site built with Faster mode?

Set swcHtmlMinimizer: false inside the future.v4 config block in your Docusaurus configuration to fall back to the older html-minifier-terser minifier, which never strips quotes from attribute values. Rebuild and redeploy, and the og:image tag regains its quotes, restoring WhatsApp link previews. Note that WhatsApp caches previews, so a phone restart or cache flush may be needed to see the fix take effect. The trade-off is losing some of the build-time speed gained from the SWC minifier.

_Developers weighing build speed against compatibility fixes can track config gotchas like this via daily.dev._

## Similar posts on daily.dev

- [Meta Releases Docusaurus 3.9 with New AI Search Feature](https://daily.dev/posts/meta-releases-docusaurus-3-9-with-new-ai-search-feature-bbcevquo3) · InfoQ · 1 upvotes · 0 comments
- [Docusaurus 3.10](https://daily.dev/posts/docusaurus-3-10-jj6fz3fb4) · Docusaurus · 9 upvotes · 0 comments

---

Tags: [#docusaurus](https://daily.dev/tags/docusaurus)

[View this post on daily.dev](https://daily.dev/posts/docusaurus-workaround-for-whatsapp-open-graph-image-bug-c9tqizl4i)
