I ran into a weird issue where
file()->ratio() returns the reversed ratio for me. Upon closer inspection in the panel I realized that Kirby indeed thinks the image is a landscape one when it is displayed as a portrait and has the dimensions switched (see screenshot).
This only happens to a few images. As Kirby’s panel does the preview correctly and also calculates the thumbs correctly, I wonder why it thinks that the ratio is reversed? Is there any way to work around this? Thanks!