resize_rendered_image_dimensions cache and mobile / desktop behaviour

25 views
Skip to first unread message

Igor Mikhalev

unread,
Aug 10, 2017, 3:36:09 AM8/10/17
to ngx-pagespeed-discuss
Hey guys,

We are trying to integrate ngx_pagespeed in our service.

Currently all is working fine, except resize_rendered_image_dimensions filter.

At first, if I go to the main page of the site serveral times, images will resize as expected (to the actual rendered width).
But If I visit the same page about 10 minutes later, images are not optimized at all (no X-Page-Speed header).

Why is this happinig? Does the cache clear in some way? How to prevent this behaviour?
May be its because our dev server has small amount of RAM?


PageSpeed Insights test warn me that images are not optimized too.
If I run test several times in 30 seconds interval (because of cache test results), I still get warnings.
After I go to the page by myself, and then run test, there is no warning, but only in section of the device I used (desktop or mobile).

Does ngx_pagespeed aware of the device user use? How does it hadle images resize in this way?


Our current ngx_pagespeed config looks like this:

Main domain:
pagespeed on;
pagespeed
FileCachePath "path_to_cache";

pagespeed
EnableFilters rewrite_images;
pagespeed
EnableFilters extend_cache;
pagespeed
EnableFilters resize_rendered_image_dimensions;

location
~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
    add_header
"" "";
}

location
~ "^/pagespeed_static/" { }
location
~ "^/ngx_pagespeed_beacon$" { }

pagespeed
Domain *-static.staging.sellios.net;




Domain wich serve static files:
pagespeed on;
pagespeed
FileCachePath "path_to_cache";

pagespeed
EnableFilters rewrite_images;
pagespeed
EnableFilters extend_cache;
pagespeed
EnableFilters resize_rendered_image_dimensions;

location
~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
    add_header
"" "";
}

location
~ "^/pagespeed_static/" { }
location
~ "^/ngx_pagespeed_beacon$" { }



You can see and test our dev build here.

Otto van der Schaaf

unread,
Aug 10, 2017, 7:34:25 AM8/10/17
to ngx-pagespeed-discuss
There is a known issue with resize_rendered_image_dimensions, which is tracked at:

I suspect you are running into that.

Otto


--
You received this message because you are subscribed to the Google Groups "ngx-pagespeed-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-di...@googlegroups.com.
Visit this group at https://groups.google.com/group/ngx-pagespeed-discuss.
For more options, visit https://groups.google.com/d/optout.

Igor Mikhalev

unread,
Aug 10, 2017, 8:11:56 AM8/10/17
to ngx-pagespeed-discuss
Looks similar, hope you can fix it soon

четверг, 10 августа 2017 г., 14:34:25 UTC+3 пользователь Otto van der Schaaf написал:
To unsubscribe from this group and stop receiving emails from it, send an email to ngx-pagespeed-discuss+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages