Andreas Andreas - 1 year ago 126
Apache Configuration Question

Disable mod_pagespeed compression for a specific image file

I'm using Apache with mod_pagespeed. For some reason I can't figure out, mod_pagespeed thinks an image is much smaller than it actually is, which means once the image gets scaled up, it's really blurry.

The image in question is a CSS background-image.

Is there a way to disable mod_pagespeed image compression for a specific file?

Answer Source

The mod_pagespeed documentation was not clear on this - my impression was that ModPagespeedDisallow only works for URLs containing HTML, but they also seem to work for individual files:

<IfModule pagespeed_module>
    ModPagespeedDisallow ""

Put this in apache2's configuration somewhere. We put it in the virtualhost configuration in /etc/apache2/sites-available.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download