Updated July 2017
Help! WordPress is showing photos sideways!
If you’re saying the phrase above, you’re not alone. In some cases, WordPress will display photos sideways from the orientation they were orignally created. This happens most often with photos from iPhones or other smartphones. If WordPress is showing your iPhone or other photos sideways, here’s what’s going on and what you can do.
WordPress Photos Sideways? It’s an EXIF Thing
You’re probably familiar with the fact that images can contain metadata – bits of information like keywords, the GPS coordinates where an image was made, or copyright information. The image’s orientation (vertical or horizontal aspect) can also be stored in this metadata. Some smartphones and cameras will store the orientation in the EXIF metadata, and unfortunately WordPress doesn’t currently read that metadata.
So while your camera or phone knows that the picture was taken vertically or horizontally, and it will display it as such, WordPress doesn’t know that and so the image might appear sideways from the orientation desired.
What To Do About It
There are a couple options:
- use a plugin such as iOS Images Fixer to automatically fix the rotation as you upload the images to WordPress. (Note: I previously recommended a plugin called Image Rotation Fixer but it no longer works with current versions of WordPress).
- use an app on your camera or phone to actually alter the pixel data to rotate the image before uploading to WordPress. For iPhones, the Rotate Mailer app is well rated.
Yes, WordPress Core Developers Know About This
This has been a known issue with WordPress since at least July 2010, when this ticket was opened to note the problem. There have been updates, but no ideal solution seems to have been found or proposed.
Hopefully we’ll see a patch in WordPress core to respect the EXIF rotation, but in the meantime you can use one of the solutions above if WordPress is showing your photos sideways.
Are your WordPress photos sideways? Here's how to fix that: https://t.co/2WA4f47tHp
— Photowebo (@photowebo) February 16, 2016