• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

IDEA Improving WebP use

Messages
14
Likes
0
Points
1
#1
Hi

First, thank you for Robin IO, it's a great plugin :)

This is following on from some of my previous comments regarding WebP files sometimes being bigger than JPG files, something that Google themselves acknowledge can happen.

After posting that thread I did a small test and uploaded 10x high quality images into WP and let Robin IO optimize these using the lossy compression setting. I then compared the Robin optimized JPG and WebP files.

For 5 images the WebP files are larger than the JPG files, and for 5 they are smaller.

When they are larger the amount can range from small differences to quite considerable ones.

When they are smaller, they are usually quite significantly smaller.

See results:

WebP bigger than JPG
IMG 001 - WebP is 13 KB / 2.39% bigger
IMG 002 - WebP is 233 KB / 23.06% bigger
IMG 005 - WebP is 55 KB / 7.21% bigger
IMG 008 - WebP is 106 KB / 12.75% bigger
IMG 009 - WebP is 3 KB / 0.41% bigger

WebP smaller than JPG
IMG 003 - WebP is 74 KB / 21.44% smaller
IMG 004 - WebP is 46 KB / 47.81% smaller
IMG 006 - WebP is 80 KB / 66.66% smaller
IMG 007 - WebP is 21 KB / 19.26% smaller
IMG 010 - WebP is 41 KB / 45.55% smaller

Ten images is of course a very small sample size. But for these results it's tempting to either say that on average using WebP leads to more KB savings than not using it or to say that it only leads to savings half of the time and the other half does the exact opposite of what is intended...

I don't know how Robin IO optimizes WebP images and if there's anything that can be improved there. It wouldn't surprise me if not because as I mentioned in my other thread, Cloudflare also acknowledge that their optimized WebP images are not always smaller than their optimized JPGs.

But because of that, Cloudflare on their paid plans, selectively serve WebP files. I.e. they check if the WebP is smaller than the JPG equivalent. If it is and the users' browser supports it then they serve the WebP. But if the WebP is bigger than the JPG equivalent, then they serve the smaller JPG file, even if the users' browser supports WebP.

I think that their handling of WebP makes the most sense in terms of performance optimization and I would suggest that WebCraftic investigate if it is technically possible to do the same thing with Robin IO?
 

Sergey Chernukhin

Support team
Beta tester
Messages
11
Likes
1
Points
3
#2
Hi

First, thank you for Robin IO, it's a great plugin :)

This is following on from some of my previous comments regarding WebP files sometimes being bigger than JPG files, something that Google themselves acknowledge can happen.

After posting that thread I did a small test and uploaded 10x high quality images into WP and let Robin IO optimize these using the lossy compression setting. I then compared the Robin optimized JPG and WebP files.

For 5 images the WebP files are larger than the JPG files, and for 5 they are smaller.

When they are larger the amount can range from small differences to quite considerable ones.

When they are smaller, they are usually quite significantly smaller.

See results:

WebP bigger than JPG
IMG 001 - WebP is 13 KB / 2.39% bigger
IMG 002 - WebP is 233 KB / 23.06% bigger
IMG 005 - WebP is 55 KB / 7.21% bigger
IMG 008 - WebP is 106 KB / 12.75% bigger
IMG 009 - WebP is 3 KB / 0.41% bigger

WebP smaller than JPG
IMG 003 - WebP is 74 KB / 21.44% smaller
IMG 004 - WebP is 46 KB / 47.81% smaller
IMG 006 - WebP is 80 KB / 66.66% smaller
IMG 007 - WebP is 21 KB / 19.26% smaller
IMG 010 - WebP is 41 KB / 45.55% smaller

Ten images is of course a very small sample size. But for these results it's tempting to either say that on average using WebP leads to more KB savings than not using it or to say that it only leads to savings half of the time and the other half does the exact opposite of what is intended...

I don't know how Robin IO optimizes WebP images and if there's anything that can be improved there. It wouldn't surprise me if not because as I mentioned in my other thread, Cloudflare also acknowledge that their optimized WebP images are not always smaller than their optimized JPGs.

But because of that, Cloudflare on their paid plans, selectively serve WebP files. I.e. they check if the WebP is smaller than the JPG equivalent. If it is and the users' browser supports it then they serve the WebP. But if the WebP is bigger than the JPG equivalent, then they serve the smaller JPG file, even if the users' browser supports WebP.

I think that their handling of WebP makes the most sense in terms of performance optimization and I would suggest that WebCraftic investigate if it is technically possible to do the same thing with Robin IO?
Hey Jonas, thanks for this research, we will figure out how to do it.

Best regards, Sergey.
WebCraftic team | Creative Motion team