Digital camera photos are often saved as JPEG with an EXIF \"orientation\" tag. To display correctly, images need to be rotated/mirrored depending on which orientation is se
I've written a little php script which rotates the image. Be sure to store the image in favour of just recalculate it each request.
Cheers