I am uploading images directly to database. When I try to upload any pictures taken with iPhone or android, they get rotated before uploading, because the orientation information is stored in the EXIF data of the file. MATE doesn't check for the EXIF data, hence the image ends up being rotated.
Any ideas to rotate images based on EXIF data before upload to db or at least storing the EXIF data along with the image, so that I can take care of rotation on the output side?
I tried looking through the main php script but could not figure out where I'd need to do this transformation.