{#each photos as photo}
{photo.altText} {#if $$slots.credit} {:else} {photo.credit} {/if}
{/each}
{#if photos[activeImageIndex].caption} {#if $$slots.caption} {:else} {#key activeImageIndex}

{photos[activeImageIndex].caption}

{/key} {/if}
{/if}