Skip to content

Auto-generated OG image is a 0-byte PNG when logoDark is a signed mintcdn.com URL #6137

@karelxfi

Description

@karelxfi

Summary

GET /_mintlify/api/og returns HTTP 200, content-type: image/png, but a 0-byte body whenever the logoDark query parameter is a signed mintcdn.com URL (the kind carrying ?fit=max&auto=format&n=…&q=85&s=<signature>).

Because a hosted/uploaded site logo is resolved to exactly such a signed URL and passed as both logoLight and logoDark into the generator, every auto-generated social/preview card on the affected site renders blank. Only pages with an explicit static og:image are unaffected.

Environment

  • Project: sqd-2119b3c3 (docs.sqd.dev), theme aspen
  • thumbnails: { "appearance": "dark", "background": "<absolute URL>", "fonts": { "family": "Inter" } }
  • logo originally a root-relative path (/images/favicon-512x512.png), which the platform re-hosts as a signed mintcdn.com URL
  • Reproduced on both production and preview deployments

Reproduction

Each page's og:image points at the generator wrapped in the Next image optimizer:

/mintlify-assets/_next/image?url=%2F_mintlify%2Fapi%2Fog%3F…&w=1200&q=100

Hitting the inner /_mintlify/api/og endpoint directly and varying only the logo params isolates the input:

logoLight logoDark result
signed mintcdn URL (omitted) ✅ ~180 KB PNG
(omitted) signed mintcdn URL 0 bytes
signed unsigned (plain URL, no query) ✅ ~181 KB
unsigned signed 0 bytes
  • Fails regardless of appearance (light or dark).
  • The signed URL itself is reachable (returns HTTP 200) and renders fine in the logoLight slot.
  • The failure is specific to how logoDark is handled when its value carries a query string / signature.

Minimal check against any affected site:

OG=$(curl -sSL "https://<site>/<page>" \
  | grep -io 'property="og:image" content="[^"]*"' | head -1 \
  | sed -E 's/.*content="([^"]*)"/\1/' | sed 's/&amp;/\&/g')
curl -sS -o /dev/null -w 'HTTP %{http_code}  bytes=%{size_download}\n' "$OG"
# bytes=0 when logoDark resolves to a signed mintcdn.com URL

Expected

/_mintlify/api/og should render a valid PNG with the logo overlay when logoDark is a signed mintcdn.com URL, the same as it already does for logoLight.

Impact

Any site whose logo resolves to a hosted, signed mintcdn.com asset gets blank social/preview cards across all auto-generated pages. This silently breaks link unfurls on Slack, X, LinkedIn, Discord, iMessage, and similar.

Workaround

Point logo at an absolute, unsigned URL on the site's own domain so the generator receives an unsigned logoDark. Confirmed to restore rendering. It is not ideal, since it bypasses CDN optimization of the navbar logo, so a fix in the OG endpoint's logoDark handling would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions