Lightbox size is broken for large images

I havea ~500x1500 image that I am trying to display in a post. When I change its scale, it appears fine in the editor:

but not so much when actually posted. It is initially stretched:

and after Discourse downloads the image, it is cropped:

This is not broken, this is default and by design behavior. The thumbnail of SUUUUPER tall images will be cropped because otherwise it looks insanely bad.

The thumbnail shown in the post preview looked reasonable to me. If this is intentional behavior though, the post preview should display the image cropped.