We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

How do I upload images and resize them without EE rotating them?

How Do I?

Varen's avatar
Varen
150 posts
5 years ago
Varen's avatar Varen

Whenever a user uploads an image from a phone (iPhone in particular) and that image is processed by EE’s native image processing routine using GD2, the processed images are rotated and the original shows in a correct orientation. Somehow GD2, in the way EE uses it, ignores EXIF info and rotates it. WHY and how do I fix this?

? 1
       
judin's avatar
judin
54 posts
5 years ago
judin's avatar judin

I just discovered the same thing! Help?

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
5 years ago
Robin Sowell's avatar Robin Sowell

Ah- it’s because the phones are using exif info to handle rotation. If that’s stripped, the image really is sideways.

I’ve got a fix working, but it needs a bit more clean up and then I’ll push it up to a branch and ping here if you want to test.

? 1
       
Varen's avatar
Varen
150 posts
5 years ago
Varen's avatar Varen

Robin, that’s very good news. Thanks for following up with this!

       
judin's avatar
judin
54 posts
5 years ago
judin's avatar judin

Thanks indeed - this is exciting to hear.

       
Robin Sowell's avatar
Robin Sowell
13,158 posts
5 years ago
Robin Sowell's avatar Robin Sowell

OK, it’s not pulled into stability for the next release yet, as I want to get some additional eyeballs on it. But it’s ready for more testing. Pull request is up here: https://github.com/ExpressionEngine/ExpressionEngine/pull/277

So to patch, you just need the one changed file system/ee/legacy/libraries/Filemanager.php here https://raw.githubusercontent.com/ExpressionEngine/ExpressionEngine/e8785aa6761d949858b280a8aed2b646da2f2dea/system/ee/legacy/libraries/Filemanager.php

       
Varen's avatar
Varen
150 posts
5 years ago
Varen's avatar Varen

Robin, I’m using the patch file and have been testing on a few images I know to be problematic. So far everything has worked perfectly. If anything changes I’ll let you know but so far it’s great! Thanks very much!

       
Varen's avatar
Varen
150 posts
5 years ago
Varen's avatar Varen

Update, I’m not sure if this is related to the new file but an exceptionally long delay in file upload has occurred. Where it once took about 10-20 seconds (max) to upload an image it now can take up to 5 minutes. I’ve researched every angle of this I can but cannot find any other cause. Server is fine, etc…

       
Varen's avatar
Varen
150 posts
5 years ago
Varen's avatar Varen

I retract my previous post. I’ve narrowed it down to a network problem with our ISP and the new filemanager.php file has absolutely nothing to do with my issue. Sorry for the alarm. V

       
Iki's avatar
Iki
34 posts
4 years ago
Iki's avatar Iki

Robin,

Just wanted to ping this post. I’m having this issue right now uploading iphone photos into EE6.0.3. I’m going to try your patch and see if that fixes it.

Thanks for all you do!

       
Iki's avatar
Iki
34 posts
4 years ago
Iki's avatar Iki

That didn’t have an effect. I left a comment on the github. I’m going to change my other installation to imagemagick and see if that changes things for me, although it seems this patch is only checking for GD, maybe not GD2?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.