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 the image editing features built into WordPress to rotate the photo. Open the image from the Media Library, click the Edit Image button, and use the rotation arrows to flip it 90 degrees in either direction.
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.