How to cache image urls with query strings?

Dewangga Bachrul Alam dewanggaba at
Fri Feb 24 14:42:24 UTC 2017


On 02/24/2017 07:33 PM, 0liver wrote:
> We've recently started delivering image urls with query strings for
> cropping, like

Try add:

proxy_ignore_headers Cache-Control Expires;


> We've also successfully been using the NGINX cache for our images *before*
> adding the query strings.
> Unfortunately, with the query strings added, caching does not work anymore
> and all requests to above URL are passed to the upstream server. You can see
> this by inspecting the HTTP response headers for above url: X-Cache-Status
> is always MISS.
> Can anybody point to me to the necessary pieces of information to get
> caching for resources with query strings to work?
> Posted at Nginx Forum:,272608,272608#msg-272608
> _______________________________________________
> nginx mailing list
> nginx at

More information about the nginx mailing list