<input type="text" placeholder="вставьте ссылку на изображение" id="imgField">
<div class="wrap">
</div>
* {
box-sizing: border-box;
}
input {
width: 250px;
padding: 5px 10px;
}
.wrap {
height: 250px;
width: 250px;
background-color: #444;
background-size: cover;
background-repeat: no-repeat;
margin-top: 15px;
}
$('#imgField').change(function () {
var img = $(this).val();
$('.wrap').css('background-image', 'url("' + img + '")');
});
This Pen doesn't use any external CSS resources.