vue-load-image
vue-load-image copied to clipboard
Any hints on how we can implement lazy loading for image?
since lazy loading is enabled since Chrome 76 and related browsers as seen here How can we enabled this feature using this library.
Currently I'm trying to put the loading="lazy" in the image slot.
<vue-load-image>
<img slot="image"
key="primary"
:src="image.src"
loading="lazy"
:alt="image.alt"/>
<div slot="preloader" class="loading-image-wrapper">
<img slot="preloader" class="loading-image"
:src="loaderImage"/>
</div>
<div slot="error" class="image-loading-error">
<error-image></error-image>
</div>
</vue-load-image>