Skip to content

Commit

Permalink
attempt to fix hydration issue?
Browse files Browse the repository at this point in the history
  • Loading branch information
biltongza committed Nov 19, 2024
1 parent 8a70d8c commit d8f8af6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion frontend/src/lib/album/thumbnail.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
let srcSets = $derived(
Object.entries(thumbnailSizes).flatMap(([sizeKey, maxWidth]) =>
Object.entries(formats).map(([extension, mime]) => ({
key: `${image.id}|${sizeKey}|${extension}`,
srcSet: `${StorageBaseUrl}/${image.hrefs[sizeKey]}.${extension} ${maxWidth}`,
mime
}))
Expand All @@ -34,7 +35,7 @@

<a href={imageRoute}>
<picture>
{#each srcSets as srcset}
{#each srcSets as srcset (srcset.key)}
<source srcset={srcset.srcSet} type={srcset.mime} />
{/each}
<img {src} class="thumbnail-image" loading="lazy" alt="" />
Expand Down

0 comments on commit d8f8af6

Please sign in to comment.