Adding support for exif data Orientation

When upload an image from e.g. an iPhone, the orientation of images is
checked and automatically taken into account when recreating the image.