Mod_Pagespeed and WordPress CSS

software development


Here’s one for which I’d like some advice.

After moving my sites here, I was getting weird image display artifacts (stretched lettering) with the nav bar and footer in my four WordPress blogs.

Your tech people concluded as follows:

I do not seem to be using any plugins that modify CSS, but if you can suggest a solution, other than killing mod_pagespeed, do let me know. I can post one of the CSS files we use if need be.


I have a solution if anyone else encounters this. It is an issue with the mod_pagespeed script, and Google actually came up with a workaround, and a future solution.

Here’s part of what one of their developers told me:

[quote]Thanks for reporting this problem. We will probably turn this filter off by default in the next release because of this issue.

As for what you can do to work around this for now, you can:

  1. Turn off this optimization: In version 0.9.15… that means “ModPagespeedDisableFilters rewrite_images”. In the current versions, you could do “ModPagespeedDisableFilters insert_image_dimensions” in your pagespeed.conf or .htaccess files (if you have access)[/quote]

The rest of the message dealt with other suggestions about the WordPress theme, but this is the important stuff, also that the version of mod_pagespeed used here is about a year old and sadly in need of an update.

I used the .htaccess directive: ModPagespeedDisableFilters rewrite_images

It worked. I have tended to be somewhat wary of Google and privacy issues in discussions on my radio show and in my online columns. I feel somewhat better about Google after their quick responses to my problem.