← All guides

How to Fix a Sideways or Rotated Image

imagesrotationorientationfix

You upload a photo. The photo viewer shows it correctly. But the website you upload to shows it sideways. Or upside-down. Or the recipient says “the photo’s rotated” but it looks fine on your screen.

This isn’t software incompetence — it’s a real conflict between how phones store photos and how different software interprets that storage.

What’s actually happening

Modern phones don’t always rotate the image data when you take a photo in a non-standard orientation. Instead, they:

  1. Save the image in its original sensor orientation (often landscape regardless of how you held the phone)
  2. Add a metadata field called Orientation that says “this should be displayed rotated 90° clockwise” (or whatever angle)
  3. Trust that the displaying software will read that metadata and rotate accordingly

The image data is sideways. The metadata says “but rotate me 90° when showing me.”

Most modern apps respect this:

  • Photos apps on iPhone/Android: yes
  • Modern browsers: yes
  • Photoshop, Preview: yes

But some older or stripped-down systems don’t:

  • Some web upload forms that strip metadata
  • Older versions of certain image viewers
  • Image processing pipelines that drop metadata

In those cases, you see the raw sensor orientation — which often looks sideways or wrong.

The fix: rotate the actual pixels

The permanent solution is to bake the rotation into the image data instead of relying on metadata.

If your phone showed photo correctly because the metadata said “rotate 90° CW,” you rotate the actual pixels 90° CW and save without that metadata flag. Now the image data is in the correct orientation regardless of what reads it.

How to fix it on different platforms

iPhone Photos:

  1. Open the photo in Photos
  2. Tap Edit
  3. Tap the crop/rotate icon (bottom)
  4. Use the rotation button to rotate as needed
  5. Tap Done

After this, the photo is saved with corrected orientation in both data and metadata.

Android Photos / Google Photos:

  1. Open the photo
  2. Tap Edit
  3. Tap the crop/rotate option
  4. Rotate as needed
  5. Save

Same outcome — corrected orientation.

macOS Preview:

  1. Open the photo
  2. Tools → Rotate Left or Rotate Right (or Cmd+L / Cmd+R)
  3. Cmd+S to save

Windows Photos:

  1. Open the photo
  2. Click the rotate button (or use the edit menu)
  3. Save

Windows Paint:

  1. Open the photo
  2. Home → Rotate (rotate left, right, flip)
  3. File → Save

After any of these, the image is permanently in the correct orientation.

Our browser-based approach

We don’t have a dedicated “rotate image” tool, but the workflow with our existing tools handles it:

  1. Open the Image Cropper
  2. Drop in your image
  3. Use the rotation handles to rotate as needed
  4. Crop to the new orientation (or use full image)
  5. Download the result

The output is permanently oriented correctly with no orientation metadata to confuse downstream tools.

Alternative — if you need to strip metadata that includes rotation info:

  1. Strip with EXIF Stripper
  2. If image now displays incorrectly, manually rotate using one of the methods above

Identifying the actual orientation problem

To diagnose whether your “sideways” photo is a metadata issue or an actual rotation issue:

Check in multiple apps:

  • If it displays correctly in iPhone Photos but sideways in a web upload → metadata-respecting vs not. The image data is sideways, metadata says “rotate.” Bake the rotation in.
  • If it displays sideways everywhere → the image data is sideways and there’s no metadata correction. Just rotate normally.
  • If it displays correctly everywhere except one specific app → that app has a bug. The image is fine.

Edge case: 90° vs 180° vs 270°

A photo can be in one of four orientation states:

  • (normal, no rotation needed)
  • 90° CW (photo taken in portrait mode, sensor is landscape, metadata says “rotate 90° clockwise to display”)
  • 180° (rare, usually only from cameras held upside-down deliberately)
  • 270° CW (or 90° CCW; photo taken in portrait the other way)

When fixing, you may need to rotate in the opposite direction of what feels intuitive. If the metadata said “rotate 90° CW” and the app didn’t, you see the image rotated 90° CCW from where it should be — so you rotate it 90° CW to fix.

In practice: just try one direction first. If the result is upside-down, rotate 180°. If still wrong, rotate again. Most fixes are obvious within 1-2 tries.

When you need to mirror/flip

Distinct from rotation:

  • Flip horizontally (mirror): left becomes right and vice versa
  • Flip vertically: top becomes bottom

Useful for:

  • Selfies that look “wrong” because the camera mirrored them (you’re used to seeing yourself in a mirror, but the saved photo isn’t mirrored — fixing means flipping)
  • Photos taken through reflective surfaces
  • Specific compositional needs

Most photo editors have flip horizontal/vertical alongside rotate.

Bulk fixing many photos

If you’ve got a folder of photos with rotation issues:

Command-line (free) with ImageMagick:

mogrify -auto-orient *.jpg

This reads each image’s orientation metadata, applies the rotation to the pixel data, and clears the metadata flag. Files modified in place.

Software with batch processing: Lightroom, Bridge, Photo Mechanic handle batch rotation correction.

Online services: less common as a free batch tool; usually requires uploading large folders.

For a few photos: do them one at a time in Photos/Preview. For many: command-line ImageMagick is fastest.

Permanent orientation = better compatibility

Once you’ve baked rotation into the pixel data:

  • The image displays correctly in every viewer, including older / simpler tools
  • Re-saving doesn’t lose orientation
  • Web uploads work consistently
  • Print services receive the correctly-oriented version
  • Image processing pipelines (resize, crop, compress) don’t accidentally re-rotate

The “metadata-based rotation” approach was a phone camera convenience that came with this compatibility cost. Baking rotation in trades a tiny amount of efficiency for universal compatibility.

Why phones still do the metadata trick

Modern phones could save photos with orientation already baked in. Most don’t, because:

  • Saving the sensor’s raw data is faster (no rotation step)
  • It saves a tiny amount of processing energy
  • The phone’s own photo app reads orientation correctly anyway, so users don’t see the problem

The cost (occasional compatibility issues) hits a small percentage of users in specific contexts. Phone makers have decided this is acceptable.

TL;DR

  • Sideways photos usually have correct image data + metadata flag, but the displaying app ignores the flag
  • Fix: rotate the actual pixels in Photos / Photos app / Preview / Windows Photos
  • Browser-based: Image Cropper has a rotate function
  • Bulk fix: mogrify -auto-orient *.jpg (ImageMagick command-line)
  • After fixing: image displays correctly in every app, no metadata dependency
  • Selfies look “wrong”: separate issue (mirroring, not rotation) — use the flip horizontal feature