Skip to content

RM-242: Normalize icon hashes and pad icon/avatar URLs#94

Merged
BenHall-1 merged 1 commit intomasterfrom
RM-242
Mar 1, 2026
Merged

RM-242: Normalize icon hashes and pad icon/avatar URLs#94
BenHall-1 merged 1 commit intomasterfrom
RM-242

Conversation

@biast12
Copy link
Copy Markdown
Contributor

@biast12 biast12 commented Feb 28, 2026

Description

RM-242
This pull request introduces improvements to how icon and avatar identifiers are handled in the frontend, ensuring they are consistently formatted before being used in URLs. The main change is the addition of a normalization step to pad icon and avatar IDs, which helps prevent issues with incorrectly formatted URLs and ensures proper image loading.

Type of Change

  • Bug fix
  • New feature
  • Breaking change

Testing

Update your server icon (or just change the hash in the local storage)
Go into the server
The icon should update/correct itself

Checklist

  • My code follows the style of this project
  • I have performed a self-review of my own code
  • My changes generate no new warnings

Add normalizeIcon helper and use it when loading guild data to ensure non-animated icon hashes are padded to 32 chars. Also update getIconUrl and getAvatarUrl to pad non-animated hashes when building webp URLs so short hashes produce correct CDN URLs and caching checks work reliably. Animated (a_*) and empty icons are preserved.
@biast12 biast12 requested a review from a team as a code owner February 28, 2026 22:51
@BenHall-1 BenHall-1 merged commit 93bca18 into master Mar 1, 2026
1 check passed
@BenHall-1 BenHall-1 deleted the RM-242 branch March 1, 2026 20:19
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.

2 participants