Repository navigation
fix(community): load contributor avatars from open collective's image service - #516
Merged
Merged
Conversation
… service The wall routed Open Collective avatars through the Cloudflare resizer, which answers 403 for that origin. Map them to the sized images.opencollective.com render of the profile, render them as plain images, and fall back to the initial when one fails to load. Claude-Session: https://claude.ai/code/session_019zws4ceJu2jctk3XT48fMX
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
launchpad | 120924e | Commit Preview URL Branch Preview URL |
Oct 11 2026, 02:05 PM |
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
The community wall (
/community) showed broken contributor avatars. Open Collective avatars were passed throughNuxtImg, so the Cloudflare resizer requested the S3 original, and it answers 403 for that origin.This applies the approach from #513 (team supporter list) to the wall:
images.opencollective.com) map to the sized render of the supporter's profile,https://images.opencollective.com/<slug>/avatar/128.png. The S3 original (~800 KB) is never loaded.smallAvatarUrltakes an optional size, defaulting to 96 as before.<img>without the resizer, with an@errorfallback to the initial letter.Rationale
The image service and the resizer are separate paths. Open Collective's own sized renders load directly, so no Cloudflare transform is needed. The mapping lives in
layers/community/utils/avatars.tsand reusessmallAvatarUrlfromshared/utils/liteSupporters.ts, which is already shared across layers.Tests
tests/community/avatars.spec.ts(new): mapping for S3 and image-service origins, the null cases (no profile, no slug), pass-through for other hosts, and the size parameter ofsmallAvatarUrl.tests/community/components.spec.ts: the supporter avatar uses the sized render, the resizer is not involved, and a failed avatar falls back to the initial.Local:
pnpm test(185 files, 1656 tests),pnpm quality(no regression),pnpm buildall pass.https://claude.ai/code/session_019zws4ceJu2jctk3XT48fMX