preloading next or prev photos for new gallery logic