If you understood correctly that you want to view the image before it is actually downloaded, right? You can do this using javascript.
By setting the width and height attributes of the image tag, you can simulate a thumbnail.
$(function() { $('#pictureInput').on('change', function(event) { var files = event.target.files; var image = files[0] var reader = new FileReader(); reader.onload = function(file) { var img = new Image(); console.log(file); img.src = file.target.result; $('#target').html(img); } reader.readAsDataURL(image); console.log(files); }); });
and html:
<form> <input type="file" id="pictureInput"> </form> <div id="target"> </div>
you can check it on the code password
source share