Skip to content

Add dynamic OG image for profile pages#111

Merged
kingRayhan merged 3 commits intomainfrom
copilot/update-profile-page-og-image
Apr 4, 2026
Merged

Add dynamic OG image for profile pages#111
kingRayhan merged 3 commits intomainfrom
copilot/update-profile-page-og-image

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Apr 4, 2026

OG images were implemented for the home page (static) and article detail pages (dynamic), but profile pages were missing one entirely.

Changes

  • New file: src/app/[username]/(profile-page)/opengraph-image.tsx
    • Next.js ImageResponse route at 1200×630px PNG — same pattern as [articleHandle]/opengraph-image.tsx
    • Fetches name, username, bio, profile_photo, and designation via the existing getUserByUsername (already "use cache"-tagged)
    • Renders: circular profile photo, full name, @username, designation, bio (truncated at 120 chars), TechDiary logo in footer
    • Blue header matching article OG style (rgb(54%, 61%, 100%)), HindSiliguri Bangla font
    • Degrades gracefully — falls back to URL username if profile not found, omits photo element if no photo is set

Copilot AI linked an issue Apr 4, 2026 that may be closed by this pull request
3 tasks
Copilot AI and others added 2 commits April 4, 2026 19:02
Copilot AI changed the title [WIP] Add OG image for profile page Add dynamic OG image for profile pages Apr 4, 2026
Copilot AI requested a review from kingRayhan April 4, 2026 19:04
@kingRayhan
Copy link
Copy Markdown
Member

Looks good 🥰
Thanks @copilot
CC: @shoaibsharif

image

@kingRayhan kingRayhan marked this pull request as ready for review April 4, 2026 19:21
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 4, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 998d2d1a-034b-43b2-9d4c-2eddc55ab143

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch copilot/update-profile-page-og-image

Comment @coderabbitai help to get the list of available commands and usage tips.

@kingRayhan kingRayhan merged commit 7b2d6db into main Apr 4, 2026
1 of 2 checks passed
Copilot stopped work on behalf of kingRayhan due to an error April 4, 2026 19:21
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.

OG Image

2 participants