question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Slider preloading too many images when lazyLoad='ondemand' and infinity=true

See original GitHub issue

The slider seems to preload too many images when using ondemand lazyLoad and infinity mode.

In the following fiddle, when using infinity=false, it preloads 3 images, on the other hand, when using infinity=true, it preloads 6 images.

http://jsfiddle.net/mllocs/p2L0neot/7/

Here you have a video showing the image requests depending on the infinity param.

http://recordit.co/eqGMsZIkA6

More Details

  • Which browsers/versions does it happen on? Tested in Chrome and Firefox.
  • Which jQuery/Slick version are you using? Edge.
  • Did this work before? I don’t know.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:2
  • Comments:6

github_iconTop GitHub Comments

1reaction
Darkstarinternetcommented, Jun 19, 2018

@mllocs Changing lazyLoad from ‘ondemand’ to ‘anticipated’ seems to fix the problem.

0reactions
fliekscommented, Jun 21, 2019

this is a better working fiddle: http://jsfiddle.net/dyfpt14j/

Read more comments on GitHub >

github_iconTop Results From Across the Web

Critical problem with preloading too many images with ...
I have a folder with about 100 images, the total size of which is about 6MB. I have an application where, after a...
Read more >
Preloading responsive images - web.dev
Learn about new and exciting possibilities for preloading responsive images to ensure great user experience.
Read more >
Faster Image Loading with Beaver Builder ... - YouTube
This covers a number of ways to work with images to speed up page loads and pass Google's Core Web Vitals. In particular...
Read more >
Three Popular and Efficient Ways for Loading Images
Every so often, galleries, stores, and landing pages load images that ... or many large images, such as designer portfolios—preload images.
Read more >
A better way to preload images for web galleries
The canonical javascript image preloader attempts to maximize the browser's ... In other words, the browser will try to download as many images...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found