Looping a scrolling thumbnail gallery

I’ve created a scrolling thumbnail gallery that draws images from a blog feed. I would like for it to loop itself after all the thumbs have gone through so the first image of the 2nd loop is immediately after the last image of the 1st loop. I know it’s possible, just can’t wrap my head around it. Any help would be appreciated. Thanks!