I am trying to use nginx as a reverse proxy in front of my image server.
I would use it with pagespeed to get better images, so for instance chrome would be served webp images instead of jpegs.
However I can't seem to get pagespeed to react to images.
When I get a 404 or html with a http 200 response I get a fine "X-Page-Speed: 1.13.35.2-0" header.
But when I get an image pagespeed seems to ignore my request, this is my nginx conf - what am I doing wrong?
worker_processes 1;
events {
 worker_connections 1024;
}
http {
 server {
   pagespeed on;
   #pagespeed Disallow "/admin*"
   pagespeed FileCachePath "/var/ngx_pagespeed_cache";
   pagespeed FileCacheSizeKb 102400;
   pagespeed FileCacheCleanIntervalMs 3600000;
   pagespeed FileCacheInodeLimit 50000;
   pagespeed EnableCachePurge on;
   pagespeed PurgeMethod PURGE;
location "/" {
     proxy_pass
http://server_ip:8080;
     proxy_set_header Host "
images.example.com";
     # only added for debug purposes
     add_header X-Upstream $upstream_addr;
     # Mark HTML as uncacheable.
     proxy_hide_header Cache-Control;
     }
location ~ "\.pagespeed\.([a-z]\.)?[a-z]{2}\.[^.]{10}\.[^.]+" {
 add_header "" "";
}
location ~ "^/pagespeed_static/" { }
location ~ "^/ngx_pagespeed_beacon$" { }
   }
}