My advice would be to get away from InDesign for this, and also to not set a height value at all. You should also avoid using fixed units like pixels. Instead I would set your landscape photos at width: 100%.
Portrait, I’m less sure. Perhaps start at something like 70% for those, and experiment from there.
Code:
<div class="landscape">
<img src="image.jpg" alt="a wide image"/>
</div>
<div class="portrait">
<img src="image2.jpg" alt="a tall image"/>
</div>
Code:
.landscape img {
width: 100%;
}
.portrait img {
width: 70%;
margin-left: 15%;
}