Add lazy loading

This commit is contained in:
Vadim
2021-01-26 00:45:38 +03:00
parent ab80cad0ad
commit 70af589aad
4 changed files with 25 additions and 9 deletions

View File

@@ -1,10 +1,13 @@
<script>
export let src
export let alt
export let loaded
</script>
<div class="image-container">
<img {src} {alt} />
{#if loaded}
<img {src} {alt} />
{/if}
</div>
<style>