svelte components for blurhash.
lazy loading with a blurhash image.
npm install --save blurhash svelte-blurhash
<script>
import BlurhashImage from 'svelte-blurhash';
</script>
<BlurhashImage
src={"https://blurha.sh/assets/images/img1.jpg"}
hash={"LEHV6nWB2yk8pyoJadR*.7kCMdnj"}
width={269}
height={173}
/>
<BlurhashImage
src={"https://blurha.sh/assets/images/img1.jpg"}
hash={"LEHV6nWB2yk8pyoJadR*.7kCMdnj"}
width={269}
height={173}
fadeDuration={600} />
<BlurhashPicture
src={"https://www.1-firststep.com/samplephp/jpg-webp-avif/image/1000.jpg"}
hash={"LEHV6nWB2yk8pyoJadR*.7kCMdnj"}
width={320}
height={206}
fadeDuration={800}
>
<source
srcset="https://www.1-firststep.com/samplephp/jpg-webp-avif/image/1000.webp"
type="image/webp"
/>
<source
srcset="https://www.1-firststep.com/samplephp/jpg-webp-avif/image/1000.avif"
type="image/avif"
/>
</BlurhashPicture>