Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Optimizing images before caching them using proxy_cache

$
0
0
Hi

I have setup Nginx s.domain.com to act as an image cache for my IIS-servers on www.domain.com (the IIS-servers are upstreams).

I'm very new to Nginx but as far as I've understood this is what happens when I get a request for an image:
1. A request is made to s.domain.com/images/image.jpg
2. If Nginx already has that image it serves it. If not it asks www.domain.com for it and then caches it.

I would like to set it up so that I optimize the image before I cache it, so that further requests to the same image get an optimized version.

I've tried finding a guide for figuring this out and I keep coming back to mod_pagespeed. But after reading about that I'm not quite sure if it would work for me as the site itself doesn't run Nginx.

Is what I'm looking for possible and if so, would someone mind pointing me in the right direction as to figuring out how I would go about setting it up?

Thanks.

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>