I have the same issue as mentioned in #253.
I want the image to fit in the certain sizes of 800px width and 600px height. When I upload a landscape image it works just great, but when I upload portrait image it rotates the image by 90 degrees. This happens with resize/fit functions. I haven't try other functions, because they don't meet my needs.
I'm using:
$width = 800;
$height = 600;
$img->fit($width, $height);
I'm confused as there is no mention in the doc of the image being rotated to fit and I don't expect it to be, or at least I expect to have an option to rotate it or not.
Cheers
Edit: I get the impression that the fit doesn't take into consideration the EXIF rotation.
Have you tried running http://image.intervention.io/api/orientate before running fit()?
Running it did solve my issue. But I believe it should be specified in the doc, I really didn't expect to have to take into consideration EXIF stuff at all.
Ideally it would be applied automatically, but since some hosts don't have PHP EXIF extension installed, or some users don't want the extra workload, I decided to make it optionally.
I perfectly understand that you're not doing it automatically, what I'm blaming though is not having that in the doc and having to dig in specific image processing stuff to find out that images have that kind of metadata and that yeah my image has this metadata entry saying you should rotate it before manipulating... Surely that's something trivial if you're a bit familiar with it, but I feel like you should not have to find that out yourself and just put a warning somewhere in the doc.
I'd like to second theofidry's suggestion to add this note to the docs, it would save a lot of people some valuable time.
Most helpful comment
I perfectly understand that you're not doing it automatically, what I'm blaming though is not having that in the doc and having to dig in specific image processing stuff to find out that images have that kind of metadata and that yeah my image has this metadata entry saying you should rotate it before manipulating... Surely that's something trivial if you're a bit familiar with it, but I feel like you should not have to find that out yourself and just put a warning somewhere in the doc.