JSFiddle - React, Tailwind, and code Playground

HTML

<div class="test-block">
  <img src="https://img.freepik.com/free-photo/front-view-stacked-books-ladders-with-copy-space-education-day_23-2149241015.jpg">
</div>

CSS

.test-block {
	max-width: 340px;
	max-height: 400px;
	overflow-y: scroll;
}
.test-block img {
	width: 100%;
}