Is it still relevant to enable gzip compression after compressed the WebP images..?
In my case I use compression middleware for express
.
Why Do We Use GZIP Compression? GZIP is effective, but it's not the only compression method out there. In fact, it's not even the best method in terms of size reduction. GZIP can reduce the amount of data by up to 70%.
Don't use gzip for image or other binary files Image file formats supported by the web, as well as videos, PDFs and other binary formats, are already compressed; using gzip on them won't provide any additional benefit, and can actually make them larger. To compress images, see Optimize images.
WebP images can be compressed via either the lossless or lossy methods. The techniques used to achieve compression results for each method are different, which is explained in greater detail below.
Gzip is a fast and easy way to improve page speed performance while still delivering a high-quality experience to your users. See if your website supports gzip by running a free speed test, and sign up for a free trial for more insights into your website's performance.
Yahoo suggests against it:
Image and PDF files should not be gzipped because they are already compressed. Trying to gzip them not only wastes CPU but can potentially increase file sizes.
https://developer.yahoo.com/performance/rules.html
And this may be helpful: https://webmasters.stackexchange.com/questions/8382/gzipped-images-is-it-worth
Is it still relevant to enable gzip compression after compressed the WebP images..?
Yes.
The compression
middleware never compressed images to begin with (by default), because most image formats already implement compression.
It only compresses responses for the following mime types:
text/*
*/*+json
*/*+text
*/*+xml
(and possibly other formats if their "compressibility" is known, see the compressible
documentation for more details)
Converting images to WebP doesn't make a difference on how it works, and the abovementioned mime types are still good candidates to apply compression to.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With