<div>
  <img src="https://via.placeholder.com/200" alt="placeholder">
</div>
img {
  vertical-align: bottom;
/*   vertical-align: top; */
}

div {
  width: max-content;
  margin: 20px;
  background: hotpink;
}

External CSS

This Pen doesn't use any external CSS resources.

External JavaScript

This Pen doesn't use any external JavaScript resources.