Skip to content

Optimize asset PNGs losslessly - #663

Merged
hannesa2 merged 1 commit into
gitx:masterfrom
tagliala:chore/optimize-png-assets
Sep 17, 2026
Merged

hannesa2 merged 1 commit into
gitx:masterfrom
tagliala:chore/optimize-png-assets

Conversation

@tagliala

@tagliala tagliala commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Losslessly optimize all 8 PNGs under assets/. No pixels change (optipng only re-encodes and strips ancillary chunks), so it is safe for the app icons and the README screenshots.

Command used:

optipng -o7 -strip all assets/*.png

The screenshots (screenshot-history.png, screenshot-stage.png) are embedded in the README, so every clone/download pulls less bandwidth.

Before / After (raw file sizes)

File Before (B) After (B) Saved (B) Saved %
[email protected] 88,630 57,759 30,871 34.8%
[email protected] 86,020 53,839 32,181 37.4%
[email protected] 88,524 58,129 30,395 34.3%
[email protected] 123,054 75,186 47,868 38.9%
[email protected] 84,059 48,984 35,075 41.7%
[email protected] 87,412 56,188 31,224 35.7%
screenshot-history.png 1,332,670 766,275 566,395 42.5%
screenshot-stage.png 800,681 397,320 403,361 50.4%
Total 2,691,050 1,513,680 1,177,370 43.8%

Bandwidth served per README view

Verified by downloading each asset from raw.githubusercontent.com on gitx/gitx:master (before) vs this PR's branch (after).

Asset (per README view) Before raw (B) After raw (B) Saved (B)
screenshot-stage.png 800,681 397,320 403,361
screenshot-history.png 1,332,670 766,275 566,395
Total 2,133,351 1,163,595 969,756 (−45.5%)

If the PNGs are served gzip-compressed

raw.githubusercontent.com currently returns these PNGs without any Content-Encoding header (the plain file size is what crosses the wire). For a gzip-capable CDN/proxy, below is what gzip level 9 would deliver (gzip -9, verified lossless):

Asset (per README view) Before gzip (B) After gzip (B) Saved (B)
screenshot-stage.png 715,921 353,230 362,691
screenshot-history.png 1,289,134 722,429 566,705
Total 2,005,055 1,075,659 929,396 (−46.4%)

Either way, each README page view transfers roughly 0.9–1.0 MB less.


Changes were made at the request of the PR author; the work was carried out by Big Pickle AI.

Shrink all PNGs under assets/ with optipng at maximum effort,
stripping ancillary chunks. Pixels are byte-identical; the two
screenshots are embedded in the README, so every clone downloads
less.

Command: optipng -o7 -strip all assets/*.png

Total: 2,691,050 -> 1,513,680 bytes (-43.8%, 1,177,370 saved)
@hannesa2
hannesa2 merged commit 776384d into gitx:master Sep 17, 2026
2 checks passed
@tagliala
tagliala deleted the chore/optimize-png-assets branch September 17, 2026 14:07
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