@@ -6,7 +6,7 @@ import type { Picture as PictureType } from 'vite-imagetools'
66
77interface $$Props extends HTMLButtonAttributes {
88 /** imagetools import */
9- src? : PictureType
9+ src: PictureType | undefined
1010
1111 /** img tag `sizes` attr */
1212 sizes? : string
@@ -18,10 +18,10 @@ interface $$Props extends HTMLButtonAttributes {
1818 height? : number
1919
2020 /** img tag `loading` attr */
21- loading: ' lazy' | ' eager'
21+ loading? : ' lazy' | ' eager'
2222
2323 /** img tag `decoding` attr */
24- decoding: ' async' | ' auto' | ' sync'
24+ decoding? : ' async' | ' auto' | ' sync'
2525
2626 /** bindable reference to `<img>` element */
2727 ref? : HTMLImageElement
@@ -70,18 +70,13 @@ $: if (len(img)) {
7070
7171 ## Usage
7272 ```tsx
73- <script>
74- // Import original full-sized image with `?as=run` query param
75- import cat from '$lib/assets/cat.jpg?as=run'
76- import Img from '@zerodevx/svelte-img'
77- </script>
7873 <Img class="cool kitty" src="{cat}" alt="Very meow" />
7974 ```
8075
8176 ## Props
8277 - `src?: PictureType` - imagetools import
8378 - `sizes?: string` - img tag `sizes` attr
84- - `width?: number` - img width override */
79+ - `width?: number` - img width override
8580 - `height?: number` - img height override
8681 - `loading: 'lazy' | 'eager'` - img tag `loading` attr
8782 - `decoding: 'async' | 'auto' | 'sync'` - img tag `decoding` attr
0 commit comments