my question is how to display the selected file image from the input file in img tag, I have described the code below.
<img src="" width="200" height="100">
<input type="file" name="logo" id="upload-logo" />
$('#upload-logo').on('change', function(){
let logo = $(this).val();
$('img').attr('src', logo);
});
but the result I got after changing the src attribute is: Not allowed to load local resource: file: /// C: /fakepath/Capture.PNG, and photos are not displayed
I do not want to use ajax