I have utilized the code below directly from the example provided at https://getbootstrap.com/docs/5.2/utilities/flex/#media-object. This code is meant to generate a box containing an image on the left and text on the right:
<div class="mycard border border-dark m-3 p-3 d-flex align-items-center" style="width: 33%;">
<div class="flex-shrink-0">
<img src="https://s3.amazonaws.com/cdn.sidsavage.com/images/prods/popup/P8889.jpg">
</div>
<div class="flex-grow-1 ms-3">
This is some content from a media component. You can replace this with any content and adjust it as needed.
</div>
</div>
One issue I encountered is that the image I used is quite large, causing distortion in the box layout. While one solution could be adding
style="max-height: 70px;"
to the img tag, I prefer the height of the box to be dictated by the text, adjusting the image size accordingly.
Feel free to experiment with my code example here: https://codepen.io/Meekro/pen/oNQGMPM