How to auto-rotate images based on EXIF information

Image viewers on the computer, in smartphones or cameras can today read the orientation information in the EXIF data of an image and auto-rotate an image when displaying it to you. However, you might want some images to be actually stored in the orientation specified in their EXIF data. For example, this helps to render correctly in old or simpler image viewers that ignore the EXIF orientation information. EXIFTran is a tool that can help you achieve this.

  • Installing it is easy:
$ sudo apt install exiftran
  • To do in-place auto-rotate of images based on their EXIF orientation:
$ exiftran -a -i *.JPEG

Tried with: EXIFTran 2.10 and Ubuntu 16.04