Reverse proxy

Hello

I have a web project in which we have some images taken from a system
file,
through rewrite and php (http://img.mydomain.com/a331ad44ef ->
http://img.mydomain.com/index.php?image = a331ad44ef). But to have
thousands
of visits was this much loading system. In other similar projects have
used
squid as a proxy reverse, but wanted to use this as a proxy nginx
reverse,
for caching images for some time and not overload the system. Could do?
This
configuration would be correct?. Thank you very much.

Regards,
Antony.