• For some reason any images I take in portrait mode are rotated sideways on wordpress. I went in and manually rotated them, they look correct in the media library, but the thumbnails and the images on the actual website are still rotated no matter what I do. I am using my Pentax digital camera or my Android phone, both seem to produce this result. I tried a couple of the image rotation plugins recommended in other threads here, but they didn’t do anything. All of the posts regarding this seem to revolve round iOS, which doesn’t apply to my situation, and I really don’t want to have to reupload all of my photos if avoidable. There is a lot of talk about EXIF data but not many solutions other than the plugins I have already tried (both named “Image Rotation Fixer”).

    This is the site if you need to see it https://unicornbacon.com/otterblog/ (don’t laugh, it’s sole purpose is to easily share pictures with my boyfriend).

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello Unicornbacon,

    Sorry for the problem with the picture orientation. I’m a photography enthusiast and work with the web hosting support team at my company, so your problem piqued my interest. I looked into the EXIF data that comes with pictures. If you’re looking at it with your Windows Explorer properties, it only shows a summary of all of the EXIF data – there’s a bunch more. I saved one of the pictures that had the orientation incorrect and looked for the EXIF orientation data. What I found was that the EXIF data (at least in this picture by your PENTAX) was not included in the picture. I found TIFF orientation data, but not EXIF orientation data. This flag is set in the newer cameras on the market, at least per this post. I reviewed your image’s entire EXIF data file using Affinity Photo on a Mac. Basically, without this flag, the software you’re using to display the image doesn’t know what’s up or down on your picture. So, irritatingly, you would have to manually adjust these pictures. I would double-check to see if there is an update to your Pentax camera firmware that adds the orientation if it’s available. I didn’t search around your gallery for an Android photo, but that’s what I would check for as well. The EXIF orientation data is set based on a sensor in your camera when you’re taking the picture. So, if you take one with the camera held vertically, then the EXIF data is flagged with that information when the picture is saved.

    I hope that explains the issue. Orientation of photos in a gallery will be determined by the EXIF data. There are also programs that can set the orientation flag. Note that image software in Windows prior to Windows 8 can not read the orientation flag. I often share photos through Google photos these days. It lets me set the orientation there if it’s wrong. The same can be said of Amazon. I use Amazon to save backups of my photos.

    I hope this information is of some use to you. I know it doesn’t immediately solve your problem, but it may explain WHY it’s happening.

    Kindest regards,
    Arnel C.

    Thread Starter unicornbacon

    (@unicornbacon)

    Yeah, the confusing part for me I that I fixed the orientation in the media library on WordPress, and they photos show up as correct in the library, but they don’t show up that way on the actual site.

    Moderator bcworkz

    (@bcworkz)

    Be sure the image src URLs in your posts lead to the corrected images. They have an -e{timestamp} added to the filename. The original images still persist on the server for links with the old src URLs.

    The wrong orientation behavior is an artifact of the GD image editor. It ignores EXIF data and inserts images based on the file’s data rows. So don’t worry about your camera firmware unless you have other issues with it. A lot of people post process their images so the photo editor corrects the row lengths when the file is saved. All cameras AFAIK save data with long image rows typical of landscape orientation. Photo editors save images with the row length correlated to the image’s orientation in the editor, so portrait images have shorter data rows.

    I’ve heard that the ImageMagick editor honors EXIF data. It’s the preferred editor in WP if there’s a choice, so it appears your server only has GD installed. The only solutions are to post process your images (a good idea anyway IMO) or to get ImageMagick installed on your server.

    Before you push for the ImageMagick solution, remember I said I heard that it honors EXIF. I could be wrong, you should verify this independently.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image rotation, NOT iOS related’ is closed to new replies.