After this image is rotated 90 degrees. Tried to upload same image to Facebook, and orientation is left the same, no rotation. Here is that image (becomes rotated like this after upload)
I just uploaded your original image (the one with people in) to my own site just fine and didn’t get it rotated or stretched. Any more information you can give us?
I’ve had image rotation issues in the past with K2; I’ve narrowed it down to an edge-case with “iPhone photo’s” which are uploaded unaltered to the website. It seems like they have some metadata setup which confuses Kirby.
I “fixed” this for my use-case in a hook with this code:
Thank you, will try it. Can you please guide me, where I should put this code? Just I am new to Kirby. Should it be in /site/config/config.php file?
By the way, from meta data I see that photo was made with Samsung (SM-G920F).
jimbobrjames, I think the reason you get good orientation is that after I uploaded here, file went through some changes and got different meta information. I tried to download it from here and upload, and all is correct then.
Quite probably. You can strip metadata with Apple Preview by going in the Inspector from the menu. Not sure if there is a way on Windows, maybe with Photoshop. Tools like ImageOptim will strip it off too. But of course, that doesn’t help you if you actually want to use some of the meta data in your template. Maybe just removing the orientation info is enough.
Yes, sure, I mean I tried both. About ImageMagick, don’t have it, as this test php - Verify ImageMagick installation - Stack Overflow returns: Fatal error : Uncaught Error: Class ‘Imagick’ not found in /home/metalista/domains/domain.lt/public_html/im.php:7 Stack trace: #0 {main} thrown in /home/metalista/domains/domain.lt/public_html/im.php on line 7