Skip to content

Serve blog author avatars from our own origin - #2014

Open
Urigo wants to merge 1 commit into
masterfrom
fix/self-hosted-avatars
Open

Urigo wants to merge 1 commit into
masterfrom
fix/self-hosted-avatars

Conversation

@Urigo

@Urigo Urigo commented Sep 18, 2026

Copy link
Copy Markdown
Member

Summary

Author pictures on the Hive blog index and post pages were hot-linked from GitHub (avatars.githubusercontent.com on cards, github.com/<user>.png on posts). The URLs work, but ad and tracker blockers drop them, so readers with one saw broken image icons next to every author name.

  • Avatars are now in the repo: website/src/hive/assets/avatars/<github>.png, 44 files at 160px (about 15 KB each), downloaded by the new scripts/hive/fetch-avatars.ts from the author registry in src/hive/lib/authors.ts. Run pnpm --filter website fetch:avatars after adding an author and commit the file. It is deliberately not part of fetch-all, so the build never depends on GitHub.
  • One component renders them: AuthorAvatar.astro emits the local image at 1x and 2x WebP through astro:assets, and falls back to an initials badge when no file exists (one author's GitHub account is gone, so it 404s from GitHub as well). Both BlogCard and BlogAuthors use it.
  • The built blog HTML no longer contains any avatars.githubusercontent.com or github.com/*.png URLs.

The landing page's team section still hot-links GitHub avatars; that is a separate component and untouched here.

Test plan

  • astro check, eslint and prettier clean.
  • Full build; grep confirms zero third-party avatar URLs in the Hive blog output and 221 self-hosted avatar images on the index.
  • Screenshots of the blog index and of the post whose author has no avatar (initials badge).

🤖 Generated with Claude Code

Blog cards and post headers hot-linked every author picture from GitHub
(avatars.githubusercontent.com on cards, github.com/<user>.png on posts).
Ad and tracker blockers drop those requests, so readers saw broken image
icons next to the author names.

The avatars now live in src/hive/assets/avatars, one PNG per GitHub login,
downloaded by scripts/hive/fetch-avatars.ts (pnpm fetch:avatars) and
committed. Astro emits them as 1x and 2x WebP. An author without a saved
file, such as one whose GitHub account no longer exists, gets an initials
badge instead of a request to a third party. The script is not part of
fetch-all on purpose: the build must not depend on GitHub being reachable.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 26 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c5a066e6-78ef-4e02-a9f3-a1cde7cbb0d4

📥 Commits

Reviewing files that changed from the base of the PR and between a5e789b and 15bb3c1.

⛔ Files ignored due to path filters (44)
  • website/src/hive/assets/avatars/AlecAivazis.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/DAB0mB.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/EmrysMyrddin.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/TuvalSimha.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/Urigo.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/XiNiHa.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/adambenhassen.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/ardatan.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/beerose.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/capaj.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/charlypoly.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/chimame.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/craicoverflow.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/croutonn.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/darkbasic.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/davidyaha.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/dimaMachina.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/dimatill.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/dotansimha.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/eddeee888.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/egoodwinx.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/enisdenjo.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/gabotechs.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/giladd123.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/gilgardosh.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/gmac.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/gthau.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/jasonkuhrt.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/jdolle.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/jessevelden.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/jonathanawesome.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/josiassejod1.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/jycouet.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/kamilkisiela.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/leonardfactory.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/maticzav.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/mskorokhodov.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/n1ru4l.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/nohehf.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/notrab.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/piglovesyou.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/saihaj.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/tshedor.png is excluded by !**/*.png
  • website/src/hive/assets/avatars/tvvignesh.png is excluded by !**/*.png
📒 Files selected for processing (7)
  • website/package.json
  • website/scripts/hive/fetch-avatars.ts
  • website/src/hive/components/blog/AuthorAvatar.astro
  • website/src/hive/components/blog/BlogAuthors.astro
  • website/src/hive/components/blog/BlogCard.astro
  • website/src/hive/lib/authors.ts
  • website/src/hive/lib/avatars.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@github-actions

Copy link
Copy Markdown

💻 Website Preview

The latest changes are available as preview in: https://pr-2014.guild-dev-website.pages.dev

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.

1 participant