-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I have an issue with handling images with slow internet connection in svelte app using prismic library
I've tried to use on:load like this
<script>
import { PrismicImage } from '@prismicio/svelte'
const a = () => {
console.log(1)
}
</script>
<PrismicImage
on:load={a}
on:loadeddata={()=>console.log(1)}
on:loadedmetadata={()=>console.log(1)}
loading='lazy'
style="position: absolute; z-index: 1; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; border-radius: 3rem; -webkit-clip-path: url(#{pathID}); clip-path: url(#{pathID});"
{field}
imgixParams={{ q: 30 }}
/>
but there is no any reaction on load and I do not really see any difference if I have loading='lazy'
It is the copy paste of my question on prismic community.
My suggestion is pretty simple, it would be nice to have working on:load handlers in PrismicImage component
BTW, thank you for easy understandable webs and docs :D
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request