Skip to content

Fix OG image tags not rendering on social platforms (Issue #50) - #51

Merged
petercr merged 2 commits into
mainfrom
fix/issue-50-og-image-meta
Apr 29, 2026
Merged

Fix OG image tags not rendering on social platforms (Issue #50)#51
petercr merged 2 commits into
mainfrom
fix/issue-50-og-image-meta

Conversation

@petercr

@petercr petercr commented Apr 29, 2026

Copy link
Copy Markdown
Owner

Summary

This PR fixes social preview metadata so Open Graph images render reliably across platforms.

Changes

  • Use correct Open Graph attribute keys (property="og:*" instead of name="og:*").
  • Normalize social metadata URLs to absolute URLs.
  • Add canonical base URL resolution with fallback order:
    • VITE_SITE_URL / SITE_URL
    • absolute VITE_BASE_PATH
  • Emit og:image/twitter:image only when an absolute URL can be produced.
  • Ensure og:url and twitter:url resolve correctly for route URLs.

Verification

  • Verified in Chrome MCP on local app:
    • / includes absolute og:image and twitter:image
    • /contact includes absolute og:url, twitter:url, and og:image

Closes #50

@vercel

vercel Bot commented Apr 29, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ccw Ready Ready Preview, Comment Apr 29, 2026 8:25pm

@petercr
petercr merged commit ba88363 into main Apr 29, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

X share link doesn't show

1 participant