feat: reduce install size by compressing images #1806
Merged
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.
Monthly wallpapers currently range in size from 10 MB to 30 MB. Once we have all 24 monthly wallpapers, they're going to take up around ~480 MB of the installation size. This is large enough that they'll take up around 10% of the installation size of Bluefin. That's hefty!
The file size could be reduced by applying lossy compression.
This commit applies 90% lossy compression to all of the monthly wallpapers. Here's a comparison.
Can you spot the difference? The one on the right, which is lossy and included in this commit, has a slightly smoother film grain. And this is with 200% zoom; at 100% zoom, it's practically unnoticeable.
This marginal decrease in quality reduces file size by 85% - 95% and at the moment it already saves 177.6MB. If you ask me, it's definitely worth it! The gains will only continue as we add new wallpapers.
I believe there's merit to uploading the lossless variants somewhere, so I propose creating a new repository to host the lossless wallpapers alongside this commit.
Wallpapers aren't the only images compressed in this commit. Two .svg files had unnecessary metadata removed, marginally reducing their file size. I looked into the compression of other images as well, but they were already small enough that the effort wasn't worth it.