JSFiddle - React, Tailwind, and code Playground

HTML

<input id="images" class="form-control" type="text" name="img">
<div class="preview">
    <img src="" class="preview-image" alt="">
</div>
    
<a href="http://cdn2.business2community.com/wp-content/uploads/2013/04/google-.jpg">Add Image</a>

CSS

.preview-image { display: none; height: auto; width: 200px; }

JavaScript

$('.form-control').on('change', function(){
    var inputVal = $(this).val();
    $('.preview-image').attr('src', inputVal).fadeIn();
})


$('a').on('click', function(){
    var href = $(this).attr('href');
    $('.form-control').val(href).trigger('change');
    return false;
})