Repository navigation
Optimize new player avatars without changing dimensions or animation - #2763
Merged
Merged
Conversation
Contributor
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.
New avatar uploads and generated player portraits publish a smaller WebP copy when it preserves the source dimensions, animation frames, timing and loop settings. Browser and API uploads share the same step after moderation; the resulting URL is used consistently for history, thumbnails and confirmed profile patches.
Original uploads remain available. Existing smaller files, APNG, oriented images, unsupported conversions and failed downloads or uploads retain the original URL. The optional conversion has byte, decoded-pixel and processing limits. It does not impose a fixed file-size target or alter existing player avatars in bulk.
Validation: 158 tests passed across six affected suites, including real SQL upload/history/cache and generation payment guards, animated GIF/WebP checks, alpha preservation and fallback behavior. TypeScript and pinned Biome checks passed. Tutorial routes, progression and guidance are unaffected. No preview or production deployment was triggered.
License
By making this pull request, I confirm that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the Studie-Tech ApS organization has the copyright to use and modify my contribution for perpetuity.
Summary by CodeRabbit