Only create gallery if there are images