The file size on the site became 2 times smaller! 14.8.2018
Reading time: 2 min
Often, while working on website optimization, we face the challenge of increasing page load speed.
Reducing page weight through image compression on the site is especially challenging.
A client will not always agree to sacrifice image quality on the site for the sake of optimization. And this is easy to understand. What is the point of faster page loading if users see blurry images in banners or product cards?
This is exactly what happened on one of our projects.
The client asked us to bring the load speed of the homepage, category pages, and product pages to the required level in Google PageSpeed Insights. Google’s recommendations specifically suggested optimizing image sizes on the site to reduce page weight.
When choosing from various libraries and services for lossless image compression, we encountered a number of problems, such as library performance and stability.
On our large projects, this is extremely critical; not all services meet the stated requirements, allowing significant quality loss when compressing images for the site; service limitations; solution cost. "Our company’s mission is to give more, and we decided to try the relatively new WebP (pronounced "weppy"), version 1.0.0 of which was introduced on 20.04.2018".
Sergey, front-end developer: WebP is a lossless image compression format proposed by Google Inc. back in 2010.
The Image Magic WebP Convert service allows bulk processing of large numbers of files.
According to Google, WebP compresses images losslessly 26% better than PNG and 25-34% better than JPEG at the same structural similarity index (SSIM).
The technology is relatively new, but it already has support from almost all popular browsers, such as: Google Chrome; Opera; Yandex Browser;
All Android browsers
Unfortunately, WebP is not currently supported by: Safari; Edge; Internet Explorer (IE) (not surprisingly..); Firefox.
Apple and Microsoft are currently testing this type of compression. Given market pressure, Firefox will likely support this format soon as well. Due to compatibility issues with these browsers, it was decided to serve compressed JPG files to them, preprocessed with ImageMagic.
Thus, by using the WebP compression format, we were able to improve page load speed in line with site optimization recommendations. The changes also allow the site to handle a much higher visitor load.
Even with more than 1,000 people on the site at the same time, load speed remains high.
Is it worth integrating WebP compression into a site even though not all browsers support it yet? The answer is yes! Absolutely.