fix: lazy load portraits
This commit is contained in:
parent
9ed2ef27be
commit
0fe02e8ad3
@ -30,7 +30,7 @@
|
||||
<source srcset="{frame}.webp" type="image/webp" />
|
||||
|
||||
<!-- If neither AVIF nor WebP are supported, load PNG format -->
|
||||
<img src="{frame}.png" alt="Painting Frame" {loading} />
|
||||
<img src="{frame}.png" alt="Painting Frame" />
|
||||
</picture>
|
||||
|
||||
<img src="/hang.png" class="hang" alt="painting hanging cord" />
|
||||
@ -38,7 +38,7 @@
|
||||
<source srcset={src.replace('.png', '.avif')} type="image/avif" />
|
||||
<source srcset={src.replace('.png', '.webp')} type="image/webp" />
|
||||
<source srcset={src.replace('.png', '.jpg')} type="image/jpeg" />
|
||||
<img {src} {alt} on:error={() => handleError()} />
|
||||
<img {src} {alt} on:error={() => handleError()} {loading} />
|
||||
</picture>
|
||||
</div>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user