Image Orientation

There's a problem with image orientation. PHP favours landscape
orientation. Perhaps the presence of EXIF data can help correct this?