I am having some issues using swiper with lazy loading images and auto slides per view, I have tested all swiper options and configurations and nothings seems to fix that problem!
Problem: next images in view are never loaded and when I slide it to the next it loads the next but the others remains all the time unloaded…
Problem:
The images are loaded after requested via api…
self.$setState({
effect: 'fade',
loading_st: true,
st: [1,2,3,4,5....], //here array with images of stores returned
});
var swiper_st = app.swiper.create(
'.swiper-container.st', {
lazy: {
threshold: 50,
sequential: false,
observer: true,
loadPrevNext: true,
loadPrevNextAmount: 2,
loadOnTransitionStart: false
},
loop: false,
loadPrevNextAmount: 2, //seems not to work as well
slidesPerView: 'auto', //does not load the next image in view
spaceBetween: 10,
pagination: {
el: '.swiper-pagination',
dynamicBullets: false,
//type: 'progressbar',
clickable: true,
},
scrollbar: {
el: '.swiper-scrollbar',
hide: false,
},
on: {
doubleTap: function (e) {
var $ = this.$;
var st_id = $(e.target).attr('data-id');
console.log({
st: st_id
});
}
}
});
Anyway to fix this and make the next images in view when using auto slides per view to load properly and all the rest?
thanks