Update image URLs in metadata for consistency and absolute paths#2
Merged
upayanmazumder merged 2 commits intodevfrom Oct 21, 2025
Merged
Update image URLs in metadata for consistency and absolute paths#2upayanmazumder merged 2 commits intodevfrom
upayanmazumder merged 2 commits intodevfrom
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR updates image URLs in metadata across the application to use absolute paths instead of relative paths, ensuring proper display in social media previews and link sharing. The changes introduce a helper function to dynamically construct absolute URLs and apply this pattern consistently to both static and dynamic metadata.
Key changes:
- Modified the
generatePageMetadatafunction to automatically convert relative image paths to absolute URLs - Updated static metadata in the root layout to use absolute URLs for Open Graph and Twitter card images
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| app/src/lib/metadata.ts | Added logic to convert relative image paths to absolute URLs in the metadata generation function |
| app/src/app/layout.tsx | Changed hardcoded image URLs from relative to absolute paths in static metadata |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates how Open Graph and Twitter card images are referenced in the app's metadata to ensure they use absolute URLs instead of relative paths. This change improves compatibility with social media platforms and link previews.
Metadata image URL updates:
app/src/app/layout.tsxfrom the relative path/og-image.pngto the absolute URLhttps://kargo.dscvit.com/og-image.pngfor both theimagesarray and the Twitter card metadata. [1] [2]Dynamic metadata generation improvements:
generatePageMetadatafunction inapp/src/lib/metadata.tsto always produce absolute URLs for images by prepending the base URL if the image path is not already absolute. This ensures all metadata images are correctly referenced. [1] [2] [3]