You can use the onload
function to check that your image is loaded or not.
var image = document.getElementById("yourImage");
image.onload = function (){
//do stuff when your image is loaded
}
Question
My problem is not so simple because I dynamically add images after that document is ready as when these images are all loaded?
Solution
You can use the onload
function to check that your image is loaded or not.
var image = document.getElementById("yourImage");
image.onload = function (){
//do stuff when your image is loaded
}