Add lazy loading on images
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
export let sizes: any = {}
|
||||
export let fit: string = 'inside'
|
||||
export let format: string = 'jpg'
|
||||
export let lazy: boolean = true
|
||||
|
||||
// TODO:
|
||||
// - sizes
|
||||
@@ -22,5 +23,6 @@
|
||||
width={width}
|
||||
height={height}
|
||||
alt={alt}
|
||||
loading={lazy ? 'lazy' : undefined}
|
||||
/>
|
||||
</picture>
|
||||
Reference in New Issue
Block a user