6

I did a Drupal site with a field gallery using nodes as albums containing multiple images.. i am using MultiUpload module to upload whole folders at one time instead of 1 image at the time like the standard image module provides. Most pictures are 1024x768 , but the photographer has also some vertical pictures 768x1024 , and when they are uploaded Drupal automatically takes the tall 768x1024 and rotates them to 1024x768 .. i just want them to be shown tall if they are tall ..

Thank you

4 Answers 4

9

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.

3
  • btw. i did not use any extensions , the module does the work itself in this case :)
    – Sillo
    May 21, 2013 at 13:01
  • 1
    @Sillo The Exif extension is probably enabled on most PHP installations, but just in case it's not, that's the reason. May 21, 2013 at 13:29
  • Thank you very much for your if solution , im glad that you provide me with all info you have.
    – Sillo
    May 21, 2013 at 13:32
3

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.

4
  • Hi there, you may have right, the pictures was just taken with the camera held vertically to make a tall picture, problem is most of pictures is old so i cant really ask for new ones .. i tried the EXIF module but it is only giving me alot of information about a testpicture , im not sure i know how to use this module properly :/
    – Sillo
    May 21, 2013 at 12:59
  • I upvoted answer by Patrick Kenny. I see things from a developer's point of view, he posted end suer solution. My answer is still valid, but his is simply better in this case.
    – Mołot
    May 21, 2013 at 13:09
  • Thank you very much for your help, im sorry if i did not say thank you. Exif Module seemed very confusing for me because i am not so experienced with Drupal .. Thank you very much for your contribution, i really appreciate it!
    – Sillo
    May 21, 2013 at 13:29
  • No need to thank me. Actually, chat in comments is discouraged. Upvotes are enough of "thank you" ;) Exif module is raw thing. It gives you data, but you need to code what to do with them on your own. I agree it can be confusing for people not so deep in coding. Especially if they are not into photography's technical magic as well.
    – Mołot
    May 21, 2013 at 13:46
3

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.

0

Save the images in another format, for example PNG. This will remove the existing EXIF information attached to the image which makes Drupal rotate the images.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.