WebP is a modern and more economical image format recommended by Google to replace the legacy PNG and JPEG.
The only problem with using WebP is that not all browsers support it yet. Therefore, the solution "on the forehead" (convert all images to webp) is not suitable.
At the same time, using WebP fits perfectly into the format of our CDN.
How it works:
When a site visitor requests a CDN image, OptiPic determines whether the visitor's browser supports the WebP format.
If supported, then the image is served as WebP.
If not supported, the image is returned in the old format (but optimized and compressed).
At the same time, the WebP version of the image is generated completely in the background on the CDN side — the visitor/browser does not wait for each image to be converted to WebP.
Each page of the site displays a different number of images.
For example, this is the site logo, icons, product photos and other photos/illustrations.
Usually, more than 1 image is displayed on 1 page of the site.
The number of images on each page of the site is very individual.
CDN OptiPic charges the number of image views, not the number of website page views.
OptiPic CDN does not change image file names and extensions.
The contents of the file and its format change depending on whether the user's browser supports the WebP format.
Let's say you have an image
/image/foo.jpeg on your site.
If the browser supports WebP - CDN OptiPic will return to
/image/foo.jpeg an image converted to WebP format with mime-type
If the browser does not support WebP - CDN OptiPic will return to the address
/image/foo.jpeg an image in the original
jpeg format, but optimized / compressed to make it faster loading.