Drupal - Automatically rotate image on upload

If you want to autorotate images based on their EXIF information, you can use the Autorotate submodule provided by Imagecache Actions.

Enable the Autorotate submodule and then add an Autorotate image action to each of your image styles. This will automatically rotate the images and hopefully give you the results that you expect.

Note that this submodule requires the Exif PHP extension to be enabled.


It happened to me too. Are you sure images are really vertical? Probably they are all horizontal, just with orientation saved in EXIF tag. Some software (like windows photo viewer and most mobile devices) recognizes this tag. Web server's GD library does not.

If that's the case, ask photographer for really vertical photos, or try EXIF module to test for that parameter and execute rotation if needed.


This is an issue that happens with iOS phones, take a look at the EXIF Orientation module to fix it.

This module reads EXIF data to rotate images that have an Orientation key set. This module solves the issue where iOS devices take images in one position but set an EXIF Orientation value, leaving applications viewing the image responsible for rotating the image.

Tags:

Media