Remove unused images, optimize remaining images #7742
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.
I've always wanted to do this, but never had the time. So I had Claude Code spin for a while on writing up some scripts to detect unused images and also to optimize every image in the repo. Handily, I also asked it to generate a report based on that optimization, that can be viewed here:
https://peppy-pixie-0f382a.netlify.app/comparison.html
The overall stats (including deletions) have brought this repository down from 154MB to 50MB. I think more could certainly be done to move some of the largest animated images out of the repo and onto a CDN too.
The main concern here is that
pnpm install
is pretty slow in the Discord monorepo because of this package—it has to download a tarball from GitHub, and whenever that tarball changes, we incur another 150MB into the pnpm store. So this should at least bring that number down and speed up employees :)