I believe it is possible to display images in the browser so that they all have the same ratio of height to width (regardless of the size and aspect ratio of the original images uploaded by the client).
You need to use [crop()](https://getkirby.com/docs/reference/objects/cms/file/crop), there is no ratio() method in the Kirby\Cms\File class.
You cannot use methods of an arbitrary class on some other class object, you can learn the details of object oriented programming here: OOP in PHP | Kirby CMS
I’m thinking aloud, so this is very probably complete rubbish…
I was hoping all the images would have the same ratio. Not necessarily the same dimensions.
So if the client uploaded an image 200px by 600px (and I wanted a ratio of 1:2) this image would get cropped to be 200px by 400px. And if the client uploaded an image 1000px by 500px they would get cropped to 250px by 500px.
But would those images then also be displayed at their cropped sizes? So your 200x400 images would be displayed at 200x400, and your 2000x4000 at that exact size?
If they are all displayed the same size, the only thing that would make sense is that they are cropped to the same size.