-
-
Notifications
You must be signed in to change notification settings - Fork 202
Perf: Optimize GitHub Avatar Sizes #9036
Copy link
Copy link
Closed
Labels
aienhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations
Description
Optimize GitHub avatar image loading by appending the s (size) query parameter to avatar URLs.
Goal: Reduce bandwidth usage by requesting appropriately sized images instead of full-resolution originals.
Changes:
src/component/GitHubUser.mjs:- Display size is
32px. - Append
&s=64(for 2x DPI) toavatarUrl_.
- Display size is
src/component/GitHubOrgs.mjs:- Display size is
20px. - Append
&s=40(for 2x DPI) toavatar_url.
- Display size is
Logic:
- Check if URL already has query parameters (it usually does, e.g.,
?v=4). - Append
&s=SIZEor?s=SIZEaccordingly.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
aienhancementNew feature or requestNew feature or requestperformancePerformance improvements and optimizationsPerformance improvements and optimizations