Open patricekaufmann opened 2 years ago
I'm not seeing 3 slides loaded in this example. Could you provide a test case showing the bug?
Thanks for looking into this! I modified your example by removing the fourth item. The bug happens when there are exactly three items:
https://codepen.io/patricekaufmann/pen/XWBaBKj
Network tab showing 3 images loaded on page load:
aaaaah good catch. Thanks for that. I'll have a fix in the next release!
The issue originates from RR https://github.com/metafizzy/flickity/pull/158
While this is more than 7 years ago, this change actually leads to weird behaviour in the following scenario:
Settings:
100% slide width, lazyLoad: 1 and wrapAround: false
Slide Amount: 3I would expect to always only lazyload the next element in this case, however with that change in the PR it leads to preloading all images if there are 3 slides total since
1 + (1 * 2) >= 3
.