var newImage = new Image(); newImage.src = "img/main.svg"; function updateImage() { if(newImage.complete) { document.getElementById("dynamicImage").src = newImage.src; newImage = new Image(); newImage.src = "img/main.svg#" + new Date().getTime(); } }