guardian/frontend — pull request #7598 by johnduffell (2014-12-18 12:02:20+00:00)
Title: cache resized PNGs

The png resizer was using too much CPU, probably because it was resizing the same images to the same sizes repeatedly.

This stores the resized pngs in S3 and serves them from there in preference to resizing them. The S3 bucket is set up to expire them after 7 days.

Not sure if I should also validate the resizes to only accept certain sizes - if we have a fixed set and the site has another size on then others will come through as the large original and be resized by the browser, if we cache any size, our S3 bucket could get very big.

There are also a few TODOs in there which I'd appreciate people's thoughts on whether it's sensible to do something with - mainly monitoring.

@robertberry any thoughts?