In my opinion load() won't be very efficient for this. Load method will always get all the html from remote page, then, if you only want part of it, jquery only inserts that part. This means every time you use load on same page you will be retrieving the whole page
Instead, you can retrieve the page once, parse your images to an array stored in browser and then use that array to manage your loading of images by simply inserting them as image tags right from the array without making another ajax call
Even this isn't as efficient as using server code to send a JSON array instead of having to parse an html page but would be better than original idea
To make array:
var images=[]; // define array
$.get('img.html', function( htmlPage){
$(htmlPage).find('img').each(function(){
images.push( this.src);
});
}}
you now have complete array of all image src's
It's not very clear how you wish to manage inserting these into your gallery
If you wanted to put all images into gallery at one time, you wouldn't need array idea at all, the above $.get could be modified to extract all images as jQuery and insert all at once