2

I am using s3fs module to put images on s3bucket using image field in any content type.

When I take a verticle picture, upload it to the s3bucket, it turns to horizontal. On local file system, it works fine, but not on s3. Any idea what could be the reason?

2

Without knowing the origin of your images nor the s3f module I'm rather guessing your problem consists of the two following parts:

  • the EXIF data of your images probably contains information that says 'this image should be displayed horizontally

  • the s3fs module or actually drupal's image module respects the information about the image orientation – but that's different from your expectation (could also be that the problem is that the info about the orientation is not respected)

According to this I would suggest you try either (or both) of the following:

  • try to strip the EXIF data in case you don't need it, for example by saving "websafe" from Photoshop or the like

  • Try to 'teach' drupal the correct exif orientation – for example by using the EXIF Orientation module.

| improve this answer | |
  • Exif Orientation is working. But when we are saving on local server. When using s3 in fields setting, it is unable to read file saying Warning: exif_read_data(): Filename cannot be empty in _exif_orientation_rotate() (line 28 of /var/www/dev.development.com/docroot/sites/all/modules/contrib/exif_orientation/exif_orientation.module) . I printed using dsm file path is there. But still unable to read. – Tanvir Ahmad Apr 23 '15 at 18:00
  • I found, its because, drupal_raealpath cant read remote image. What should be the other option then? – Tanvir Ahmad Apr 26 '15 at 8:06
0

A possible cause for this is mishandling/misreading of the exif data within an image. http://en.wikipedia.org/wiki/Exchangeable_image_file_format

| improve this answer | |

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.