I always prefer to use the example mentioned in Konva JS: Image Events to load images.
You need to have a list of image URLs as object or array, for example:
var sources = {
lion: '/assets/lion.png',
monkey: '/assets/monkey.png'
};
Define the Function definition, where it receives list of image URLs and a callback function in its arguments list, so when it finishes loading image you can start excution on your web page:
function loadImages(sources, callback) {_x000D_
var images = {};_x000D_
var loadedImages = 0;_x000D_
var numImages = 0;_x000D_
for (var src in sources) {_x000D_
numImages++;_x000D_
}_x000D_
for (var src in sources) {_x000D_
images[src] = new Image();_x000D_
images[src].onload = function () {_x000D_
if (++loadedImages >= numImages) {_x000D_
callback(images);_x000D_
}_x000D_
};_x000D_
images[src].src = sources[src];_x000D_
}_x000D_
}
_x000D_
$(document).ready(function (){
loadImages(sources, buildStage);
});