Performance: Optimize static SVG assets with SVGO
Created by: umpox
Closes https://github.com/sourcegraph/sourcegraph/issues/26280
We could consider using svgo-loader
here too, but it will result in quite a different workflow (inlining SVGs instead of serving statically on a path). We can't easily determine where these SVGs are being consumed so I think the best option here is to optimize them as much as possible immediately, and add tooling so we can easily do this in the future.
Savings:
codemonitoring-illustration-dark.svg:
Done in 305 ms!
62.524 KiB - 33% = 41.88 KiB
codemonitoring-notify-light.svg:
Done in 4 ms!
1.524 KiB - 27.2% = 1.109 KiB
codemonitoring-notify-dark.svg:
Done in 6 ms!
1.53 KiB - 27.1% = 1.116 KiB
codemonitoring-search-light.svg:
Done in 4 ms!
1.424 KiB - 32.3% = 0.964 KiB
codemonitoring-search-dark.svg:
Done in 4 ms!
1.426 KiB - 32.2% = 0.967 KiB
devtooltime-logo.svg:
Done in 32 ms!
12.762 KiB - 30.3% = 8.893 KiB
sourcegraph-logo-dark.svg:
Done in 10 ms!
4.812 KiB - 0.3% = 4.795 KiB
customer-logos-light.svg:
Done in 70 ms!
25.169 KiB - 37% = 15.85 KiB
homepage-hero-light.svg:
Done in 1128 ms!
173.431 KiB + 0.3% = 173.888 KiB
customer-logos-dark.svg:
Done in 63 ms!
25.261 KiB - 37.3% = 15.851 KiB
sourcegraph-mark.svg:
Done in 1 ms!
0.529 KiB - 0.2% = 0.528 KiB
logo-firefox.svg:
Done in 717 ms!
407.213 KiB - 48% = 211.666 KiB
sourcegraph-logo-light.svg:
Done in 10 ms!
4.812 KiB - 0.3% = 4.795 KiB
codemonitoring-illustration-light.svg:
Done in 174 ms!
62.548 KiB - 33% = 41.907 KiB
logo-chrome.svg:
Done in 21 ms!
4.902 KiB - 33.4% = 3.267 KiB
homepage-hero-dark.svg:
Done in 1247 ms!
178.439 KiB + 0.4% = 179.215 KiB