Since a few days I am bugged with INJECTION of PAGESPEED scripts for every image all across my theme files, and it just messes up the code (though it doesn't break the site). I want this to be removed somehow!!! I tried manual deletion but (it reappears on next load), and then I found it could be a prob of cloudflare that I use and disable all settings on cloudflare but still didn't work! Is there some way I can disable it? Somehow.

Here is one instance where the code is messed up


This might be caused by the mod_pagespeed Apache module. You should talk to your hoster to disable this.

| improve this answer | |
  • 1
    This is definitely caused by mod_pagespeed. Author should ask holster to turn it off, or try to use my plugin wordpress.org/plugins/kagg-pagespeed-module which allows to turn off pagespeed module. This cause, however, ?ModPagespeed=off to be added to every site url. – KAGG Design Jan 22 '18 at 2:25
  • I use custom Amazon AWS, and I don't think Amazon is doing this since it wasn't there for the last few years. I think its Cloudflare which is responsible for it, but I tried disabling all Cloudflare features, but it had no impact. – aswinshenoy Jan 22 '18 at 3:40
  • I am not able to understand how it is able to put the script inside my theme files (i.e. on every img tag in my theme), and it even puts a </head> tag on template files. Maybe I can use the plugin, but I am curious how it actually crept in???? – aswinshenoy Jan 22 '18 at 3:43
  • @KAGGDesign I tried your plugin, but it doesn't work to help me out. – aswinshenoy Jan 22 '18 at 16:35

Not the answer you're looking for? Browse other questions tagged or ask your own question.