guardian/membership-eventbrite-images — pull request #11 by mattandrews (2014-11-26 16:38:29+00:00)
Title: Generate smaller images

This does two things:

- adds a `cache-control` header which defaults to a year's expiry
- makes uploaded images either 40 or 60 JPEG quality (larger depending on image width)

For an idea of the benefits, compare these before/after uploads:

| file | dimensions | size in KB |
|------------|------------|------------|
| [pigeon.jpg](https://s3-eu-west-1.amazonaws.com/membership-eb-images/14506809257/pigeon.jpg) (original) | 1920x1152 | 1400 |
| [940-2x.jpg](https://s3-eu-west-1.amazonaws.com/membership-eb-images/14506809257/940-2x.jpg) (new) | 1880x1128 | 144 |

This won't effect existing images – debating about doing the `cache-control` manually (JPEG work will be a bit of a pain).

(note that some of this work involved a change in the config file which you'll need to fetch from S3 manually to see the diff)