We iterate through the loop once to render out the hidden gallery images—the ones that will expand when we click.