Back in the old days, there was only a width limit, but it would lead to tall, skinny images (like manhua) taking up multiple screens of vertical space (relevant issue).
There is likely a better solution than just a hard cut off, but my css skills pretty bad and I am on mobile atm. If it is a pure css problem, then you might be able to fix it using custom css in your user profile.
Edit: found this snippet in !piefed_css@piefed.social
.post_teaser_image_preview a { max-height: unset !important };