EXIF: WordPress Images Appear Rotated

I recently encountered a problem with images appearing rotated whilst updating the latest posting in the How Writers Write feature on this WordPress powered website.

The images looked fine whilst I was editing the page, but when previewed they appeared rotated.

Searching online showed this to be a known problem, all to do with EXIF data. You can read more about EXIF data by following this link to How-To Geek

The WordPress problem seems to be that the images are recorded with one orientation and then displayed with the rotation stored in the EXIF data added to them.

The easiest way I’ve found to get the images displaying properly is to first strip the EXIF data and then to rotate them appropriately before uploading. There are instructions on the How-To Geek link above on how to strip EXIF data in Windows.

It’s a lot simpler in Ubuntu or similar.

First, install exiftool

sudo aptitude install exiftool

Exiftool allows you to look at the EXIF data in an image as follows

exiftool someImage.jpg

We want the data stripped. Copy your images to a directory (I just copy them to my pristine desktop) and then run the following command

me@comp:~/Desktop$ exiftool -all= -overwrite_original -ext jpg .

And that’s it. Time for a cup of tea.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.