WEBP images available only after page refresh

68 views
Skip to first unread message

Vito Santimone

unread,
Jan 26, 2022, 5:32:14 AM1/26/22
to mod-pagespeed-discuss
WEBP images available only after page refresh

hi I have installed and configured so my nginx (see later);
Everything works but this happens: when I open a page at the first load only very few images are webp ... I refresh and all are webp.
Obviously this does not help me to improve and I would like to understand what I am doing wrong. Can anyone give me a suggestion? Thank you

pagespeed on;

   pagespeed EnableFilters make_google_analytics_async;
   pagespeed Disallow "https://www.outletscarpeonline.it/cassa/checkout-ssl/";
   pagespeed Disallow "https://www.outletscarpeonline.it/cassa/carrello/";
   pagespeed EnableFilters extend_cache;
   pagespeed Disallow "* .js *";
   pagespeed Disallow "* .css *";
   pagespeed ImageLimitOptimizedPercent 95;
   pagespeed EnableFilters inline_preview_images;
   pagespeed RewriteLevel OptimizeForBandwidth;
   pagespeed EnableFilters convert_png_to_jpeg;
   pagespeed EnableFilters convert_jpeg_to_webp;
   pagespeed EnableFilters convert_to_webp_lossless;
   pagespeed XHeaderValue "Powered By ngx_pagespeed";
   pagespeed EnableCachePurge on;
pagespeed EnableFilters collapse_whitespace;


   pagespeed FileCachePath / var / cache / ngx_pagespeed;

   pagespeed FetchHttps enable;
   pagespeed Disallow “/ wp-admin *”;

   pagespeed Statistics on;
   pagespeed StatisticsLogging on;
   pagespeed LogDir / var / log / pagespeed;
   pagespeed AdminPath / pagespeed_admin;
   pagespeed DisableFilters prioritize_critical_css;

location / ngx_pagespeed_statistics {allow all; }
location / ngx_pagespeed_global_statistics {allow all; }
location / ngx_pagespeed_message {allow all; }
location / pagespeed_console {allow all; }
location ~ ^ / pagespeed_admin {allow all; }
location ~ ^ / pagespeed_global_admin {allow all; }

   location ~ ^ / pagespeed_admin {
                allow all;
   }

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

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

Longinos

unread,
Jan 26, 2022, 2:00:39 PM1/26/22
to mod-pagespeed-discuss
Hi
There is a parameter:
pagespeed ImageMaxRewritesAtOnce NumImages;

By default pagespeed only try to optimize 8 images at once, you can set this with a -1 value, aka all images, and see how much latency add to page load.
Another ting is what cache-control http header have the images. You have set it at 20.

Pagespeed stored the images the time this header is set, off course if you have space in the cache and the optimized resource is not evicted.
So if the optimized image is in the cache, pagespeed don´t need to reoptimized it, and serves optimized image from their cache.
If you have a 300 in the cache-control header the image is optimized every 5 min (if the image is requested)

And can you try to disable  W3 Total Cache for testing purposes?.
Reply all
Reply to author
Forward
0 new messages