andrewhavens opened a new issue #1895: Optimized image URLs 404 when using 
default config
URL: https://github.com/apache/incubator-pagespeed-mod/issues/1895
 
 
   nginx version: 1.15.6
   pagespeed version: 1.13.35.2-0
   
   Observed behavior:
   * Optimized image URLs are replaced in HTML
   * Loading the page on one screen (e.g. low dpi) requests the `@1x` images, 
which successfully loads the optimized webp images:
     * 
`xhero,401x-6a6e57f7fca63357e1ebd32e176c34f4fd8c5fad5460fa33002e39e28b6412f8.jpg.pagespeed.ic.PCXO2e9LPX.webp`
   * Loading on another screen (e.g. high dpi) requests the `@2x` images, but 
they all 404:
     * 
`xhero,402x-703e0140208613824bbbc7c0a4265a1927f80a1bd0aee3c9a463cd2a7db20926.jpg.pagespeed.ic.e84ta-HJhq.webp`
   * Manually requesting the unoptimized image loads without issue:
     * 
`h...@2x-703e0140208613824bbbc7c0a4265a1927f80a1bd0aee3c9a463cd2a7db20926.jpg`
   * The behavior is not consistent. I can purge the cache and successfully 
load the `@2x` images but then the `@1x` images don't load.
   
   
   Relevant sections of our nginx config:
   ```
   pagespeed on;
   pagespeed Domain https://ourapp.herokuapp.com;
   pagespeed FetchHttps enable;
   pagespeed FileCachePath /app/var/ngx_pagespeed_cache;
   pagespeed RewriteLevel CoreFilters;
   pagespeed EnableFilters debug;
   
   # NOTE: Setting HttpCacheCompressionLevel to zero fixes a bug with double 
gzip compression.
   pagespeed HttpCacheCompressionLevel 0;
   
   upstream app_server {
     server unix:/tmp/nginx.socket fail_timeout=0;
   }
   
   server {
     # ...
   
     location / {
       proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
       proxy_set_header Host $http_host;
       proxy_redirect off;
       proxy_pass http://app_server;
     }
   
     location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
       add_header "" "";
     }
     location ~ "^/pagespeed_static/" { }
     location ~ "^/ngx_pagespeed_beacon$" { }
   }
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to