tags:

views:

611

answers:

1

YSlow says that images referenced from my CSS file (background image, for example) are not GZipped. I have static and dynamic compression turned on for my website in IIS7... so they should be compressed.

Is this a bug with YSlow or do image requests from CSS files ignore the compression header?

Is there a way to get these images GZipped?

+5  A: 

It is not necessary or desirable to GZIP compress images, because images are already compressed using a compression algorithm very similar to GZIP anyway.

You may save less than 1% or so of bandwidth, so given the significant extra CPU usage it is not really a good idea. Compare that to a typical 50% to 60% bandwidth saving for text based files like HTML, JS and CSS, which is where GZIP compression shines.

The exception to this rule would be uncompressed image formats like uncompressed BMP or uncompressed TIFF, but I doubt you're using that.

I am guessing that IIS has been configured not to attempt to compress images, which is a good thing.

thomasrutter