My experience shows, that:
a. most performance impact make non-optimized / non-compressed images
b. original size of the most images is oversized in relation to their natiralWidth and naturalHeight (place on the page, allowed through HTML, CSS)
Without getting to know naturalWidth and naturalHeight of images, their compression remains not efficient: i.e.
- you have a non-compressed image.
- You know its physical size, 800x600, but you don’t know its naturalWidth and naturalHeight (you can only guess, that they are smaller then physical size).
- In reality, naturalWidth and naturalHeight are 150x100.
- What do you do?
- You compress a 800x600 image without to cut it to 150x100 first.
But imagine, how huge would be the optimization win, if you firstly cut the image to its naturalWidth and naturalHeight, and then compress it?
It would be enough to test just a few pages - each page type, and, knowing naturalWidth and naturalHeight of images on all page types we would be able to cut all website images to their real sizes. And then compress.
Would it not be magic?