Allow Image component to not use async decoding
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
export let ratio: number = undefined
|
||||
export let alt: string
|
||||
export let lazy: boolean = true
|
||||
export let decoding: "auto" | "sync" | "async" = "auto"
|
||||
|
||||
interface Sizes {
|
||||
small?: { width?: number, height?: number }
|
||||
@@ -78,8 +79,8 @@
|
||||
srcset={srcSet.jpg.join(', ').trim()}
|
||||
width={imgWidth}
|
||||
height={imgHeight}
|
||||
alt={alt}
|
||||
{alt}
|
||||
loading={lazy ? 'lazy' : undefined}
|
||||
decoding={lazy ? "async" : undefined}
|
||||
{decoding}
|
||||
/>
|
||||
</picture>
|
||||
Reference in New Issue
Block a user