Images will be captured immediately when the parent div is set to display: none .
If this is not your intention, and you do not want to go with the AJAX route, you can insert images into the DOM only by clicking the read more... button, as in the following example:
var hiddenDiv = document.getElementById("your-hidden-div-id"); var imageToLoad = document.createElement("img"); imageToLoad.setAttribute("src", "image1.png"); hiddenDiv.appendChild(imageToLoad);
source share