fetch
let requestObj = `images/${i}.jpg`;
fetch(requestObj).then(function(response) {
return response.blob();
}).then(function(myBlob) {
let {size,type} = myBlob,
objectURL = URL.createObjectURL(myBlob);
document.querySelector("#idImage").src = objectURL;
});
en action