4 ms·
I got mine down to 160 bytes with some pixel tweaking and converting it to a 16-color indexed PNG. It's not a lot of work or very difficult (I'm an idiot at gra
by arp242 5y ago
I got mine down to 160 bytes with some pixel tweaking and converting it to a 16-color indexed PNG. It's not a lot of work or very difficult (I'm an idiot at graphics editing), but you do need to spend the (small amount of) effort. I embed it as a data URI and it's just four lines of (col-80 wrapped) base64 text, which seems reasonable to me.
Haven't managed to get my headshot down to less than 10k without looking horrible no matter how much I tweaked the JPEG or WebP settings, and thought that was just a tad too big to embed. Maybe I need to find a different picture that compresses better.
I got that 280k Discord favicon down to just 24K simply by opening it in GIMP and saving it again. I got it down to 12K by indexing it to 255 colours rather than using RGB (I can't tell the difference even at full size). You can probably make it even smaller if you tried, but that's diminishing returns. Still, I bet with 5 more minutes you can get it to ~5k or so.
It's very easy; you just need to care. Does it matter? Well, when I used Slack I regularly spent a minute waiting for them to push their >10M updates, so I'd say that 250k here and 250k there etc. adds up and matters, giving real actual improvements to your customers.
The Event Horizon Telescope having a huge favicon I can understand; probably just some astronomer who uploaded it in WordPress or something. Arguably a fault of the software for not dealing with that more sensibly, but these sort of oversights happen. A tech company making custom software for a living is quite frankly just embarrassing to the entire industry. It's a big fat "fuck you" to anyone from less developed areas with less-than-ideal internet connections.
- TheJoeMan 5y ago“ I got that 280k Discord favicon down to just 24K simply by opening it in GIMP and saving it again. “ You made me laugh out loud. I agree that stuff like YouTube.com saying 144x but really 145x seems like it should be embarrassing.
- arp242 5y agoI wouldn't be surprised if that was for a specific reason, like somehow showing up better somewhere for some reason, or something like that. Or maybe not; who knows...
- fbrchps 5y agoOh hey, Discord must have seen this article -- their favicon is down to 14k now.
- ehsankia 5y agoIt's not, at least for me. If you checked in devtools, that's gzip over the wire size. Hover over the size and it'll show you the actual resource size, still 285k for me.
- dmurray 5y agoThe gzipped size is probably the correct metric to care about, right? Virtually all browsers will support that. Sure, Discord could do a bit better, but it's not correct to knock them here for costing their users 285KB.
- MrBoomixer 5y agoThis is bad math, not researched heavily but in 2020 discord had 300 million users. 285kb goes a long way with wasted energy and bits flowing through the pipes. I agree generally with what your saying though gzipped sizes are what's being sent some CPU usage somewhere to unzip. less bytes == less waste?
- lmm 5y agoPNG basically includes gzip in the file format, so you're not reducing the amount of CPU used, you're just moving where it happens.
- giantrobot 5y agoIncludes but doesn't always use. PNG also includes filters which can dramatically decrease sizes, especially when combined with compression. That's why tools like OptiPng basically brute force all the combination of options. Depending on the image content different combinations of filters and compression will get the best file size.
- nerfhammer 5y agothere are png optimizer programs, e.g. optipng
- memco 5y agoImageOptim was a favorite of mine. They have a standalone mac app and a webservice. It combines several of these tools into a single GUI.
- vadfa 5y ago`optipng -o9 -strip all' is a must
- pseudosavant 5y agoThe Squoosh (web) app is awesome for this too! All processing is done locally with wasm. https://squoosh.app https://squoosh.app
- jamesfinlayson 5y agoI found https://pngquant.org/ https://pngquant.org/ to be pretty good.
- account42 5y agoNote that unlike some of the other tools mentioned here, pngquant does lossy compression. Might still be the right tool in many cases, but it means you should check the output while e.g. optipng is a no-brainer to add to whatever your publishing pipeline is.
- JohnTHaller 5y ago256x256 PNG reduced to 256 colors with pixel transparency gets it to 2.68K. I manually dropped the color depth to indexed and saved it out in PhotoShop and I used FileOptimizer to shrink it. It includes 12 different image shrinkers and runs them all.