What you've got
shouldn't work - a page loaded from the internet should not be able to load a file from the user's local file system. The fact that it works in Edge seems like a bug to me.
You can either use
URL.createObjectURL[
^] or
FileReader.readAsDataURL[
^] to load a preview of the image. Both will work in all versions of Chrome, Firefox, Opera, Safari and Edge, and will work in IE10 or later.
$("#URI").on({
change: function () {
if (this.files && this.files[0]){
modalImg.src = URL.createObjectURL(this.files[0]);
$('#imageModal').modal('show');
}
}
});