0

I have a website where users can upload pictures of themselves. Many of these pictures are taken with mobile phones and as a result a lot of them are shot such that the picture is vertical, but it is uploaded as horizontal because Drupal ignores the EXIF data. This can be fixed using the Image Cache Actions module (autorotate submodule), but if I do so, this breaks the Manual Crop module, which I use to trim the pictures as necessary.

Is it possible to somehow have Drupal automatically rotate all images upon upload based on their EXIF data if available, such that image styles would be applied to the rotated image, not the original image?

1

Another option is to process the images before they are uploaded. I wrote a windows script to do this 5+ years ago. It still works, but I won't be offering any support for it. http://www.autoitscript.com/forum/topic/85891-imagemagick-batch-jpg-processor/

0

Use the http://drupal.org/project/imagecache_actions, this module has a sub-module imagecache_autorotate. The "autorotate" image filter do what you want.

  • I mentioned the autorotate submodule in my question; it does not do what I want, because the autorotate module rotates the "image style" version of the image, not the original file itself. I want to rotate the original file itself. – Patrick Kenny Jan 7 '13 at 15:51
  • I see. You can still use imagecache_actions but generate the style on the upload and move the file. I will code this on hook_node_presave but you can perhaps use a module like drupal.org/project/rules_image_styles. – gagarine Jan 7 '13 at 16:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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