mod_pagespeed working only partially on Wordpress

77 views
Skip to first unread message

Dániel Berkó

unread,
Sep 23, 2015, 10:30:57 AM9/23/15
to mod-pagespeed-discuss
Hi,

I have a Magento and a Wordpress page on my server. I installed mod_pagespeed recently and it seems to work flawlessly on Magento, but some of the modules doesn't seem to work on my Wordpress site. Things like convert_jpeg_to_webp and convert_to_webp_lossless doesn't seem to work while rewrite_javascript work. My Pagespeed.conf: http://pastebin.com/AWRVAFne
I'm slightly puzzled why the same configuration works on one site, but not the other.

Jeff Kaufman

unread,
Sep 24, 2015, 9:07:39 AM9/24/15
to mod-pagespeed-discuss
Could you post a link to an image that you would expect to be being
converted to webp but isn't?
> --
> You received this message because you are subscribed to the Google Groups
> "mod-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mod-pagespeed-di...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mod-pagespeed-discuss/d745c033-1b94-4b16-9420-8e10509b5dfc%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Dániel Berkó

unread,
Sep 29, 2015, 5:43:33 AM9/29/15
to mod-pagespeed-discuss

Jeff Kaufman

unread,
Sep 29, 2015, 8:07:25 AM9/29/15
to mod-pagespeed-discuss
That image is strange: without PageSpeed it's being served
Cache-Control: max-age=2592000 but it also looks like it has changed
over time? Specifically, if I fetch:

http://www.magentotidehunter.co.uk/blog/wp-content/uploads/2015/09/Pinterest_light.png

I get a 256x256 image with 4081 bytes. If I fetch:

http://www.magentotidehunter.co.uk/blog/wp-content/uploads/2015/09/Pinterest_light.png?PageSpeed=off

I get a 35x35 image with 1625 bytes. If I fetch:

http://www.magentotidehunter.co.uk/blog/wp-content/uploads/2015/09/Pinterest_light.png?a=b

I get a 35x35 image with 1509 bytes.

So it looks like the image was bigger, you replaced it with a smaller
one, but PageSpeed still has the bigger one cached. If you clear your
PageSpeed cache this should clear up.
https://developers.google.com/speed/pagespeed/module/system#flush_cache

When I fetch http://www.magentotidehunter.co.uk/blog/wp-content/uploads/2015/09/Pinterest_light.png?PageSpeed=off
and link it from some html on my site, when I fetch it from Chrome I
see:

<img src=xtest.png.pagespeed.ic.VQ2XZlFLOI.webp>

This looks right to me.

What does your image link look like in the html?
> --
> You received this message because you are subscribed to the Google Groups
> "mod-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mod-pagespeed-di...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mod-pagespeed-discuss/642c12cf-4247-4726-a487-da232d1c4914%40googlegroups.com.

Dániel Berkó

unread,
Sep 30, 2015, 12:14:07 PM9/30/15
to mod-pagespeed-discuss
I flushed the cache by using the following command:
/var/cache/mod_pagespeed/cache.flush
Now the properly sized image is being featured, but the images still won't get converted to .webp

The image link looks like this:
<img class="social_ball_pinterest" title="Pinterest" src="http://www.magentotidehunter.co.uk/blog/wp-content/uploads/2015/09/Pinterest_light.png" alt="" width="35" height="35" />

Would I have to specify the domain for Pagespeed? I went trough the documentation and found the part about Mapping Domains. I wondered if that could be the issue.
I also checked for .htaccess files, but the single one I found in the wordpress folder had nothing inside it in regards to the pagespeed module.

Jeff Kaufman

unread,
Sep 30, 2015, 12:52:42 PM9/30/15
to mod-pagespeed-discuss
I found the image in it's context:

http://magentotidehunter.co.uk/blog/2015/09/12336

It has:

<img class=social_ball_pinterest title=Pinterest
src="http://www.magentotidehunter.co.uk/blog/wp-content/uploads/2015/09/Pinterest_light.png"
alt="" width=35 height=35 />

When I append ?PageSpeedFilters=+debug to the url I see:

<!--The preceding resource was not rewritten because its domain
(www.magentotidehunter.co.uk) is not authorized-->

So the problem is that PageSpeed handling a request for
magentotidehunter.co.uk sees something on www.magentotidehunter.co.uk,
and refuses to rewrite it. If these are both yours and refer to the
same server, which I expect they do, then you can fix this by adding:

ModPagespeedDomain www.magentotidehunter.co.uk

to your config.
>> > email to mod-pagespeed-di...@googlegroups.com.
> --
> You received this message because you are subscribed to the Google Groups
> "mod-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mod-pagespeed-di...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/mod-pagespeed-discuss/76e74706-9be3-402f-95ce-13dfeedecba6%40googlegroups.com.

Dániel Berkó

unread,
Oct 1, 2015, 6:24:00 AM10/1/15
to mod-pagespeed-discuss
Didn't know about this ?PageSpeedFilters=+debug, its pretty neat. Thank you for your help.
On the slider of the blog we have some images which are delivered from a CDN. I tried appending the debug line above but I saw nothing under Sources.
I've added the following to the configuration file:
ModPagespeedFetchHttps enable
>> > To view this discussion on the web visit
>> >
>> > https://groups.google.com/d/msgid/mod-pagespeed-discuss/642c12cf-4247-4726-a487-da232d1c4914%40googlegroups.com.
>> >
>> > For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "mod-pagespeed-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
Reply all
Reply to author
Forward
0 new messages