thoughtbot/paperclip — pull request #688 by jimryan (2011-12-21 19:51:03+00:00)
Title: Original image should be processed before all other styles

We ran into a peculiar problem when working with images that had to be rotated by passing the ```-auto-orient``` option to ImageMagick: Since the original image is processed along with the other styles, styles appearing before the :original style in the :styles options hash are generated from the preprocessed original file, which broke cropping in our case because the preprocessed original image wasn't oriented properly. This could certainly cause other issues and undesired behavior, especially when reprocessing the attachment, as that operates entirely on the processed original, whereas when the attachment was first saved, some styles may have been generated using the preprocessed original.

My solution is to always process the :original style first, so that all other styles are generated from the same processed original image.