This question has already been answered:
I need to load a picture in a loop and continue with the code. There is no wait () method for the picture :)
What should I write in onload() so that the execution of the cycle continues only after the image is loaded?
for(var i in images){ var img = new Image(); img.src = images[i]; img.onload(тут код); } UPD:
here is the object itself with the paths of the pictures
var images = { "image1": "screen001.PNG", "image2": "Снимок.PNG", "image3": "doctype.png" };