Image crop uses file orientation

On a Kirby 3.6 website I got a slider with images that are being cropped to 1200 pixels in width and 800 pixels in height, however when an image is in a landscape orientation the dimensions are being switched to 1200 pixels in height and 800 pixels in width. Is there a way to prevent this from happening?

Are these images ones with EXIF data with orientation data inplace? There was an issue a while back with this causing issues as it was incorrectly interpereted.

As far as i know the standard crop happens from the dead centre of the image aslong as the image exceeds the dimensions you wish to crop by, regardless of orientation.

You can loop over the images with $image->exif() | Kirby CMS to see what kirby is getting from the exif data, if its present in the files.

You can also use $image->isLandscape() | Kirby CMS and $image->isPortrait() | Kirby CMS in if statements to do different things based on the images orientation.

Bunch of other useful image methods here

The images all register as the same orientation. I was kinda hoping that there is a method or option to remove/ignore the exif data for a crop. I tried setting ‘autoOrient’ to false, but that didn’t do anything as well.

So all your files have landscape orientation in their exif data, no matter if they are landscape or not?

Yeah, according to the $image->orientation() function.

Are these camera phone photos? i think there are instances where you take a picture with the phone turned to portrait but the screen hasnt flipped so although visually the phone is portrait, the phone thinks the screen is still in landscape, so it stamps that in the exif, if that makes sense.