To overcome the internet speed problem, Google has developed a new open source image compression algorithm called Guetzli which reduces the JPEG size by about 35%. It also makes sure that image quality will not be affected and the images are compatible with existing web browsers and image editing applications.
However, Guetzli takes a longer time to compress the image when compared with other solutions. But to get the higher quality image with a smaller size which in turn results in faster loading of websites, it is worth waiting longer. The reason behind this slowness is, Guetzli uses a psycho-visual model called "Butteraugliuce" to reduce file size, which approximates color perception and visual masking.
Check this example to get an idea of how this algorithm exactly works like:
According to Google research, the compressed image file sizes are kept constant that human raters preferred their image instead of libjpeg produced images, though the libjpeg files were the same size or even slightly larger.
Google also has other projects to reduce web image sizes such Zopfli encoder which creates smaller PNG files and WebP, a new image format that supports both lossless and lossy compression. Guetzli is available for free on Github .
Web developers, graphic designers, and photographers can try this by themselves. For more information regarding its working, visit Google Research blog.