4

I want to limit image dimensions on upload, but obviously the exif information gets lost then. I am using the imagecache actions module resp. the imagecache autorotate, which actually works fine when I don't restrict image dimensions on file upload.

How do I set a maximum image resolution on upload and keep the exif so that imagecache can rotate images afterwards?

2 Answers 2

3

Drupal (7 by itself, 6 via ImageCache) uses GD library. GD cannot handle EXIF, so if EXIF are ever kept during operations, it's more by accident than by design. If you need to keep EXIF, either avoid any processing based on GD (and that means any Drupal and ImageCache provided operations, both in Drupal 6 and 7), or save EXIF to text field on first upload, for example with EXIF Custom, and then add it back on download.

1
  • Yes it is. As far as I know there are no plans to introduce EXIF support to gd. You can read more and ask more about it on stackoverflow, like here for example.
    – Mołot
    Commented May 31, 2013 at 9:58
3

Use ImageMagick as toolkit or do the resize as part of the image style (thus not on upload) and after the autorotate effect.

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.