Skip to content

Serve the parchment texture as WebP, not a 13MB PNG - #104

Open
thatoneguy10001 wants to merge 1 commit into
masterfrom
chore/webp-parchment-texture
Open

Serve the parchment texture as WebP, not a 13MB PNG#104
thatoneguy10001 wants to merge 1 commit into
masterfrom
chore/webp-parchment-texture

Conversation

@thatoneguy10001

Copy link
Copy Markdown
Owner

Cuts the Pages build from 17 MB to 3.3 MB. One asset was 80% of it.

ui/public/textures/teastain 102.png is 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 to art-source/ so it stays in the repo for future re-exports without being copied into the build.

Before After
Pages build 17 MB 3.3 MB
Texture asset 13,547,742 B 62,650 B

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.css and 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 --noEmit clean; 77 tests pass
  • Built and served: texture resolves to /textures/teastain.webp and decodes at 913×1200
  • No remaining teastain%20102 references anywhere in ui/src
  • Played through world select → Iron & Blood → Vanguard → Gate of Fort Iron; parchment renders correctly on the menu screens

🤖 Generated with Claude Code

`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>
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.

1 participant