Why I should not compress images in HTTP headers?

Agusti-N picture Agusti-N · Feb 10, 2011 · Viewed 14k times · Source

I read some articles about HTTP headers compression. Today I installed YSlow and it recommends that I compress the resources (text/html, javascript, css and images). Now I'm reading the documentation for Apache mod_deflate but in the example don't compress images.

Should I or should I not compress images in my site?

Answer

Skilldrick picture Skilldrick · Feb 10, 2011

Your images should already be compressed - any extra compression won't have any noticeable effect on filesize, but will increase processing time.

Compressing files that have already been compressed very rarely results in a reduction in filesize, and can often increase filesize.