Possible incompatibility with Google PageSpeed Module


Hi all,

I use infomaniak.com (a Swiss hosting solution) to host some projects. Infomaniak offers to activate the Google PageSpeed Module (on Apache) to optimise many things (cache, image, merge css and js…).

I exported a Blocs project with the Enable Lazy Loading option (Blocs v2.4.5). Everything went fine until I activated PageSpeed: some pictures (rewritten by PageSpeed Module, easily noticeable because of the new name, for example xbmc.png.pagespeed.ic.PIN1p2vAoA.png instead of xbmc.png) are not loaded. But some are!?

If I disable the PageSpeed Module, everything goes fine.

My guess: there is some incompatibility between lazysizes.min.js (used by Blocs to lazy load images) and Google PageSpeed Module.

Does anyone notice that?

This is not related to the Beta version, but I did not find a best category for that possible issue. I did not tried with v2.5.0b6.

If the issue is real, maybe a quick notice in the export window could save time to other users. I just spent hours to find that problem.

Best regards. Laurent


Google PageSpeed Module has a built in option for lazy loading images. My best guess would be your host has that option turned on.

From the Google documentation under risks:

Sites that employ JavaScript libraries to implement lazy-loading may not work properly with this mechanism. https://www.modpagespeed.com/doc/filter-lazyload-images


Thanks for your input!


I thought Google had discontinued this



PageSpeed Module and the PageSpeed Service are different things. On the page @Flashman post links to, scroll down to Alternatives to PageSpeed Service and you’ll see a section called Server side modules. PageSpeed Module is what the host is providing, and is the latest and greatest from Google. It’s probably good for a lot of optimization options; however, care needs to be taken as conflicts can happen when you use multiple tools to do the same thing.
Other options for optimization would include Cloud-based alternative like CloudFlare.


I’ll second that point from @teefers about using mixed tools for these jobs. CloudFlare generally includes most of the performance lifts you might be looking for and often done better than certain alternatives, but clashes can occur. I’ve had problems in the past with Nginx as well.

Having said that, I’ve been very impressed by LightSpeed, which I combine with CloudFlare, Railgun and some other tricks to good effect, but the LightSpeed cache is incredibly sticky, so I find it best to disable everything when making site updates and check for changes using the privacy or incognito mode. CloudFlare is as much about security as speed, so if I was purely after a speed boost I’d happily leave it with LightSpeed.

I’ve wondered if we should enable minification when exporting from Blocs and disable it in CloudFlare or vice versa.