Welcome! Log In Create A New Profile

Advanced

Optimizing images before caching them using proxy_cache

Posted by tommypnt 
Optimizing images before caching them using proxy_cache
August 07, 2017 09:51AM
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.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 268
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready