There is a great module for NGINX, modpagespeed. Tasks which are assigned to it is an automatic resizing images, caching them and displaying users already cache images. But this miracle is very very bad, and this is reflected in the fact that it is cut, it will cache, but it is new users not setting this case. And only during the second viewing it is there that introduces all these caches are partially. In short this Randa is not acceptable for the project, the need for control. Whether there are ready decisions of type modpagespeed? Or to write it himself :) as always, the era of frameworks and also sweet code.