Skip to content

Remove unused images, optimize remaining images #7742

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

stevenpetryk
Copy link
Contributor

@stevenpetryk stevenpetryk commented Aug 8, 2025

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 :)

@stevenpetryk stevenpetryk marked this pull request as ready for review August 9, 2025 02:14
@stevenpetryk stevenpetryk requested a review from a team as a code owner August 9, 2025 02:14
@colinloretz
Copy link
Contributor

yay for smaller!

@stevenpetryk looks like this SVG didn't survive the process. Revert that one?
https://discord.com/developers/docs/activities/how-activities-work

image

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