Skip to content

fix: og image error#110

Merged
dcrawbuck merged 1 commit intomainfrom
dcrawbuck/fix-og-image-500
Feb 19, 2026
Merged

fix: og image error#110
dcrawbuck merged 1 commit intomainfrom
dcrawbuck/fix-og-image-500

Conversation

@dcrawbuck
Copy link
Collaborator

@dcrawbuck dcrawbuck commented Feb 19, 2026

This fixes OG image generation failures in Cloudflare runtime for /docs/og routes.
The OG renderer now avoids fs.readFile at request time and uses a request-derived static logo URL instead.
Route handlers for docs, SDK, and AI OG endpoints now pass logoUrl into renderOgImage.
Verified: the previously failing OG URL returns 200 in OpenNext Cloudflare preview, and both bun run build:cf and bun test pass.


Note

Low Risk
Small, localized changes to OG image rendering and route handlers; main risk is visual regressions (font/logo loading) rather than data or security impact.

Overview
Fixes OG image generation failures in Cloudflare by removing runtime fs/font/logo file reads from renderOgImage and switching to a URL-based logo source.

Updates the /og/ai, /og/sdk, and /og/docs/[...slug] route handlers to accept the incoming Request, build an absolute logoUrl from req.url, and pass it through to renderOgImage (which now also uses a system font stack and drops embedded font config).

Written by Cursor Bugbot for commit ff2b05a. This will update automatically on new commits. Configure here.

@dcrawbuck dcrawbuck added the preview Preview deploy for this PR (Superwall team only) label Feb 19, 2026
@dcrawbuck dcrawbuck changed the title Fix Cloudflare OG image 500s fix: og image error Feb 19, 2026
@dcrawbuck dcrawbuck merged commit 4e0094b into main Feb 19, 2026
5 checks passed
@dcrawbuck dcrawbuck deleted the dcrawbuck/fix-og-image-500 branch February 19, 2026 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview Preview deploy for this PR (Superwall team only)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant