Use each profile's own GitHub avatar as its Open Graph image - #629
Conversation
Every user profile page currently shares the same generic 200x200 site logo (site.defaultImage) as its og:image/twitter:image, even though the site declares twitter:card: summary_large_image, which needs a substantially larger image to render correctly. Profile pages already have the person's github username in scope, so this uses their real GitHub avatar (460x460, always reachable) instead, falling back to the site default only when no github username is set. Homepage and other non-profile pages are unaffected. Verified with a full `npm run build`: homepage still uses site.defaultImage, every profile page now renders its own avatar URL in og:image/twitter:image.
|
|
Overall Grade |
Security Reliability Complexity Hygiene |
Code Review Summary
| Analyzer | Status | Updated (UTC) | Details |
|---|---|---|---|
| JavaScript | Oct 3, 2026 3:24a.m. | Review ↗ | |
| Secrets | Oct 3, 2026 3:24a.m. | Review ↗ |
Important
AI Review is run only on demand for your team. We're only showing results of static analysis review right now. To trigger AI Review, comment @deepsourcebot review on this thread.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused metadata change correctly preserves existing fallbacks and non-profile behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Updates profile metadata to use each developer’s GitHub avatar while preserving the default image elsewhere.
Changes:
- Uses the profile’s GitHub avatar for Open Graph and Twitter metadata.
- Retains
site.defaultImagewhen no GitHub username exists.
| File | Description |
|---|---|
src/_includes/layouts/base.njk |
Selects a profile-specific social image. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
This has not fixed #499 But I merged it anyway thanks for this part of the fix |
The site declares
twitter:card: summary_large_image(inseo-meta.njk), which needs a substantially larger image to render correctly (1200x630 recommended, ~300x157 minimum). But every profile page was falling back to the same genericsite.defaultImage, which is only 200x200 — too small for the large-image card type, and identical across every single profile regardless of who it is.Verified live on the deployed site (
opengraph.xyzpreview + direct fetch): homepage/games page OG tags already render correctly with the site logo; profile pages (/users/{name}/) were the ones using the undersized, non-person-specific image.Fix
Profile pages already have the person's
githubusername in template scope. This uses their real GitHub avatar (https://github.com/{github}.png?size=460, confirmed live: 460x460, always reachable, no auth needed) asog:image/twitter:imageinstead of the shared generic logo — falling back tosite.defaultImageonly if a profile has nogithubfield set. Homepage and all other non-profile pages are untouched.Verification
npm run buildlocally._site/index.html(homepage) still usessite.defaultImage— unaffected._site/users/0xMRTT/index.htmlnow rendersog:imageashttps://github.com/0xMRTT.png?size=460— the person's real avatar, live and reachable (confirmed 200, 460x460 PNG).src/_includes/layouts/base.njk); no other files touched.🤖 Generated with Claude Code