If you set the image in div, you also must set both height and width. This may cause the image to lose its proportion. In addition, you must set the image URL in CSS instead of HTML.
Instead, you can set the image using the IMG tag. In the container class you can only set the width in percent or pixel and the height will automatically maintain proportion.
This is also more effective for accessibility of search engines and reading engines to define an image using an IMG tag.
.container {_x000D_
margin: auto;_x000D_
width: 200px;_x000D_
position: relative;_x000D_
}_x000D_
_x000D_
img {_x000D_
width: 100%;_x000D_
}_x000D_
_x000D_
.block {_x000D_
width: 100%;_x000D_
position: absolute;_x000D_
bottom: 0px;_x000D_
top: 0px;_x000D_
box-shadow: inset 0px 0px 10px 20px white;_x000D_
}
_x000D_
<div class="container">_x000D_
<img src="http://lorempixel.com/200/200/city">_x000D_
<div class="block"></div>_x000D_
</div>
_x000D_