I have a UIImageView inside a UITableViewCell. The cell height changes based on the number of lines of text in a UILabel using estimated row heights. I want this image to be centered vertically in the cell, with a fixed width, and height >= 40 and <=80. As the cell height increases I want the image to increase to that max height then stop, always remaining vertically centered. To do this, I added those two height constraints and the width constraint, plus constraints to the top and bottom of the cell with a constant of 5 for some padding and a priority of 250. Adding a background color to the image view you can see it is being laid out as expected. But when I set the image on the image view, the height is changing unexpectedly.
With 3 lines in the label:
- without an image: image view is ~60pt tall as expected
- with an image: image view is 80pt tall - expected it to be ~60
With 6 lines in the label:
- without an image: image view is 80pt tall as expected
- with an image: image view is 80pt tall as expected
Why is that? How can I make sure the image in the image view doesn't affect the image view size, as I want the cell height determined by the auto layout constraints to determine it?

