{#if media.length}
{#each media as mediaItem, index} {/each}
{/if}