On that figure of 30%:
When you multiply the dimensions together before calculating the ratio, you get the reduction in pixels, which accurately reflects how much you actually save in terms of data transfer and storage.
It comes out to about 8% of the original. That feels a lot different from CSS's 30%. Now reducing your images _really_ makes sense!
A lot of people don't realize this, so pointing it out may be helpful.
@hxii As for optimizers, I really like optipng for png.
* pngq (pngquant with an improved algorithm)
All (at least) available for Linux.
@Coffee thanks! I'll add them to the list
@hxii Looks like I made a typo. It's pngnq, not pngq.
@hxii Nice article. Very informative Paul.
@hxii @neauoire Shouldn't the website creation tool handle that for you? I'm surprised WordPress doesn't do all that by default. I feel like it's the job of the website builder tool to automatically do all that. Like a game engine will automatically bake or convert or preprocess asserts so that it runs smoothly on the client side.
@neauoire Yeah, for sure. But could that be automated in your building script? Like it automatically resize the image to the dimention it will be displayed, then tries to compress using jpg and png and pick whichever gives the smallest file size?
Or is is still more valuable to spend lots of time to do it manually?
@narF I've considered it. But then okay, I need to make a script that picks the right optimization depending if it's pixelart(gif/png), or black & white photography(jpg full dithering256), or full color photography(95%jpg), or vector with sharp lines(png8 or png32). But the hard part is not gathering all these different tools, libraries and scripts. The hard part is reading the image and figuring out which type of compression it should use.
So in the end, I do it by hand, it takes 0.5 seconds
Merveilles is a community project aimed at the establishment of new ways of speaking, seeing and organizing information — A culture that seeks augmentation through the arts of engineering and design. A warm welcome to any like-minded people who feel these ideals resonate with them.