docs: fix team page GitHub avatar loading - #1130
Merged
dengliming merged 4 commits intoJul 28, 2026
Merged
Conversation
…on team page Replace avatars.githubusercontent.com URLs with github.com/<username>.png format for all member avatars, add referrerpolicy="no-referrer" and onerror fallback to handle image loading failures. Also fix http:// links to https://. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
HTML inline onerror attributes are stripped during MDX-to-JSX compilation in Docusaurus. Replace raw <img> tags with a GitHubAvatar React component that properly handles image load failures and shows a fallback avatar. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
The import script accidentally added GitHubAvatar import in the middle of the file where Contributors is imported, causing acorn MDX parsing errors. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Replace the img-first-then-fallback approach with a render-initials-first strategy. The component shows a colored circle with the user's initials (Inline SVG) immediately, then tries to load the GitHub avatar in the background. On success it swaps to the photo; on failure it keeps the initials. Users never see a broken image regardless of network conditions. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
dengliming
approved these changes
Jul 28, 2026
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.
Summary of Changes
Branch: fix/team-page-github-avatar-loading
Problem: Member avatars on the /team page were failing to load because avatars.githubusercontent.com is unreliable in certain regions. The team page (~55+ members) used direct CDN
URLs with no error handling.
Changes across 4 files (+304 / -215 lines):
A React component that replaces raw
tags. Instead of showing a broken image on failure, it renders initials immediately as an inline SVG (colored background + extracted
initials from username), then loads the real GitHub avatar in the background. On success it swaps to the photo; on failure it keeps the initials. Users never see a broken image.
A fallback silhouette avatar SVG (kept as a static asset, though the component now uses inline SVG initials instead).
close #1112