Skip to content

Commit

Permalink
site: upgrade to imagetools 6 (#10888)
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored Oct 18, 2023
1 parent 8ac89e8 commit 9f77282
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sites/kit.svelte.dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"tiny-glob": "^0.2.9",
"typescript": "5.0.4",
"vite": "^4.4.9",
"vite-imagetools": "^5.0.8",
"vite-imagetools": "^6.0.0",
"vitest": "^0.34.5"
},
"type": "module",
Expand Down
4 changes: 2 additions & 2 deletions sites/kit.svelte.dev/src/lib/Image.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<img {src} {alt} {...$$restProps} />
{:else}
<picture>
{#each Object.entries(src.sources) as [format, images]}
<source srcset={images.map((i) => `${i.src} ${i.w}w`).join(', ')} type={'image/' + format} />
{#each Object.entries(src.sources) as [format, srcset]}
<source {srcset} type={'image/' + format} />
{/each}
<img src={src.img.src} {alt} {...$$restProps} />
</picture>
Expand Down

0 comments on commit 9f77282

Please sign in to comment.