It's possible with a core edit. I will explain it how you can do it with images on category pages (catItemImage).
First find
components/com_k2/templates/default/category_item.php and copy it in
templates/yourTemplate/html/com_k2/templates/default. This is called a template override. With this you can update K2 without losing your core edits.
Then open
category_item.php and find
<span class="catItemImage">
<a href="<?php echo $this->item->link; ?>" title="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>">
<img src="<?php echo $this->item->image; ?>" alt="<?php if(!empty($this->item->image_caption)) echo K2HelperUtilities::cleanHtml($this->item->image_caption); else echo K2HelperUtilities::cleanHtml($this->item->title); ?>" style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;" />
</a>
</span>
There you can see this line:
style="width:<?php echo $this->item->imageWidth; ?>px; height:auto;
Change it to:
style="height:<?php echo $this->item->imageWidth; ?>px; width:auto;
From now on, if you set a fixed width for your category images in your ACP, you will instead set a fixed height and a dynamic width.
You need to make these steps also in the item.php (for article images). I think you can figure it out yourself now.