Serve the parchment texture as WebP, not a 13MB PNG - #104
Open
thatoneguy10001 wants to merge 1 commit into
Open
Conversation
`teastain 102.png` is a 2540x3338 RGBA PNG — 13.2MB — used as a background on five menu and modal screens. It shipped in the Pages build, so every visitor downloaded it. Downscale to 1200px WebP: 62KB, visually identical at center/cover, which is the only way it is ever drawn. The full-resolution PNG moves to art-source/ so it stays available for future re-exports without being copied into the build. Pages build drops from 17MB to 3.3MB. Cherry-picked from the texture half of the mobile-viewport work so the public build stops serving 13MB while the rest of that branch is still in progress. theme.css and the UI scale knob are deliberately not included here. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Cuts the Pages build from 17 MB to 3.3 MB. One asset was 80% of it.
ui/public/textures/teastain 102.pngis a 2540×3338 RGBA PNG — 13.2 MB — used as a background on five menu and modal screens. It shipped in the Pages build, so every visitor to the live URL downloaded it.Downscaled to 1200px WebP: 62 KB, visually identical at
center/cover, which is the only way it is ever drawn. The full-resolution PNG moves toart-source/so it stays in the repo for future re-exports without being copied into the build.Scope
Cherry-picked from the texture half of the in-progress mobile-viewport work, so the public build stops serving 13 MB while the rest of that branch is still being worked on.
theme.cssand the UI scale knob are deliberately not included — this is the asset change only, five one-line URL swaps plus the file move.Verification
tsc --noEmitclean; 77 tests pass/textures/teastain.webpand decodes at 913×1200teastain%20102references anywhere inui/src🤖 Generated with Claude Code