johannschopplich / unlazy

🪧 Universal lazy loading library for placeholder images leveraging native browser APIs

Home Page:https://unlazy.byjohann.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature request (Nuxt): manually load images

jjjuulliiaann opened this issue · comments

Describe the feature

There is a method in the docs to manually load an image before it enters the viewport. This is not yet possible when using the Nuxt integration, or am I missing something?

A practical use case could be a horizontal slideshow, where you could preload the previous and the next slide image manually, so that they are already loaded when the user switches slides.

I tested it with a new prop named immediateLoad (see jjjuulliiaann@5784246) that triggers the loading when set to true. Do you think that could be a useful addition? I noticed you already had a similar implementation a while ago but removed it in 4e03c62.

Additional information

  • Would you be willing to help implement this feature?
  • Can you think of other implementations of this feature?

Final checks

Thanks for the feature request! Great idea. Will take a look into it, but not this week. 🙂