This should include all the final optimizations outlined by @hotlittlewhitedog in !653 (closed). This should improve memory usage at the cost of some more CPU usage when an image is first downloaded. This also strips EXIF from JPEGs, eliminating that as an exploit vector.