You need to do this with CSS, how you would do so given what you’ve shared I can’t say
.selector img {
height: 100%;
width: auto;
}
That would limit the image to the height of its container, alternately you could limit the image itself
.selector img {
max-height: 150px;
width: auto;
}