Perhaps take advantage of the subreddit image system here so that a) SSL's automatic and b) the proper storage on S3 including correct headers, file compression, etc. are done by the automatic stuff.