How can I adjust the height of an image in a text module?

Thanks for the assistance.

It’s making heigh short but I want that it also adjust the image according to height instead of cropping the image.

see an image showing now.

is this possible to change the code accordingly ?