orientate() doesn't work with iPhone pictures?
What I do:
Image::make($request->get('image'))
->orientate()
->resize(1920, null, function ($constraint) {
$constraint->aspectRatio();
$constraint->upsize();
})
->save($img_path = public_path('img/posts/imgposts/' . $fileName), 90);
Unfortunately images from iPhones for example do not rotate properly. Upright images end up being landscape. I attached the image I am using for testing.

Edit: Wow, github doesn't handle the picture properly either.
Thank you, but I use Laravel. I thought there must be a way to properly detect the orientation of an image?
Whoops sorry was not paying attention. What about trying this instead? Again, sorry. Will delete the message.
$img = \Image::make($request->file('image_file')->getRealpath());
$img->orientate();
I have the same problem, any suggestion to solve?
this is my code:
$img = Image::make($file);
$img->orientate();
$img->resize($width, $height, function ($constraint) {
$constraint->upsize()
})
->encode();
Storage::put($path, (string) $img);
my php.ini config:
I have a similar issue #868.
Any update on this issue?
In my case, orientate worked well and img tags were okay but css background was not. Even if it was the same image. I removed EXIF tags before saving as in this comment https://github.com/Intervention/image/issues/542#issuecomment-219232968 and it works now
Using setFileInfoFromPath($url) (as mentioned in https://github.com/Intervention/image/issues/343#issuecomment-540485694) makes orientate() work correctly as well.
@FrittenKeeZ this works, thank you! Case closed.