Open hecktarzuli opened 6 years ago
Same for me!
I'm actually using it without vue-lazyload. But I can't figure out how to add lazysizes to the lightbox?
@sven-ra, not sure how that's possible. vue-lazyload is in the package.json file as a production dependency, so you're using it.
It's imported in main.js right off the bat.. https://github.com/pexea12/vue-image-lightbox/blob/master/src/main.js
If you attempt to use lazysizes with this, you may have to resort to some trickery and/or hooks as I don't think this lib exposes the template via slots (I could be wrong)
Okay weird. In the Readme it states that I should install vue-lazyload myself and import it into my project. Which I am not doing at the moment. Anyways the lightbox works, but the images are not using lazyload. Even when I imported vue-lazyload.
I have a feeling I'm being dumb. main.js is for their example. I'm still 99% sure vue-lazyload will be in your node_modules but if you tree shake you're probably fine. As to why your stuff isn't working, sorry I can't help ya.
If anyone still cares I have removed this dependency in my fork / package.
Man I really wanted to love this package, and I was so close. Then I noticed that it's heavily dependent on vue-lazyload. Why? I'm using what I believe is a better lazy load lib (https://github.com/aFarkas/lazysizes) and I'm stuck with the decision on going with a different lightbox or having 2 lazy load libs.
This seems to be a decision I shouldn't have to make.
Can't your comp detect if lazy load is installed and do whatever it needs to?