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.