Add images to page programatically using the nested loop.