[PR #8238] [CLOSED] Og image dynamic url #16089

Closed
opened 2026-04-13 10:22:53 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/better-auth/better-auth/pull/8238
Author: @himself65
Created: 3/1/2026
Status: Closed

Base: canaryHead: cursor/og-image-dynamic-url-cc2f


📝 Commits (1)

  • f49f999 fix(docs): use dynamic URL for OG images via metadataBase

📊 Changes

3 files changed (+22 additions, -3 deletions)

View changed files

📝 docs/content/blogs/1-5.mdx (+1 -1)
📝 landing/app/blog/[[...slug]]/page.tsx (+14 -2)
📝 landing/app/layout.tsx (+7 -0)

📄 Description

Dynamically resolve OG image URLs by setting metadataBase to Vercel environment variables.

Previously, OG images either used hardcoded domains or relative paths without a base URL, resulting in incorrect or static image links. This change configures Next.js's metadataBase in the root layout, allowing all relative metadata URLs to automatically resolve to the correct production or preview URL provided by Vercel.


Slack Thread

Open in Web Open in Cursor 


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/better-auth/better-auth/pull/8238 **Author:** [@himself65](https://github.com/himself65) **Created:** 3/1/2026 **Status:** ❌ Closed **Base:** `canary` ← **Head:** `cursor/og-image-dynamic-url-cc2f` --- ### 📝 Commits (1) - [`f49f999`](https://github.com/better-auth/better-auth/commit/f49f999ad5f6adcab23673a078d658b66aa9212b) fix(docs): use dynamic URL for OG images via metadataBase ### 📊 Changes **3 files changed** (+22 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/content/blogs/1-5.mdx` (+1 -1) 📝 `landing/app/blog/[[...slug]]/page.tsx` (+14 -2) 📝 `landing/app/layout.tsx` (+7 -0) </details> ### 📄 Description Dynamically resolve OG image URLs by setting `metadataBase` to Vercel environment variables. Previously, OG images either used hardcoded domains or relative paths without a base URL, resulting in incorrect or static image links. This change configures Next.js's `metadataBase` in the root layout, allowing all relative metadata URLs to automatically resolve to the correct production or preview URL provided by Vercel. --- [Slack Thread](https://betterauth.slack.com/archives/C0A8B5BARUK/p1772348458564899?thread_ts=1772348458.564899&cid=C0A8B5BARUK) <p><a href="https://cursor.com/agents/bc-7b6ab034-f641-5d4c-9202-e0288c599e4b"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-web-light.png"><img alt="Open in Web" width="114" height="28" src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a href="https://cursor.com/background-agent?bcId=bc-7b6ab034-f641-5d4c-9202-e0288c599e4b"><picture><source media="(prefers-color-scheme: dark)" srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source media="(prefers-color-scheme: light)" srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img alt="Open in Cursor" width="131" height="28" src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</p> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 10:22:53 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/better-auth#16089