var photos = [ {img:'img1.jpg'}, {img: 'img2.jpg'}];

$(photos).each(function() {
(new Image()).src = this.img;
});