b-carousel-slide :img-src lazy-loading
See original GitHub issueI would like to have my (dozens+) carousels images being lazy loaded rather than blocking rendering.
I don’t know if it’s impossible or just undocumented (there is no *lazy*
on carousel documentation)
Any hint welcome.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:20 (9 by maintainers)
Top Results From Across the Web
Bootstrap Carousel Lazy Load - Stack Overflow
The simplest solution would be: <div id="carousel" class="carousel slide lazy-load" data-ride="carousel" data-interval="false"> <div ...
Read more >Carousel | Components - BootstrapVue
When using img-src or img-blank on <b-carousel-slide> , you can set the image width and height via the img-width and img-height props on...
Read more >Carousel load all slides | Quasar Framework Community
Hi! Is there a way to load all slides at render in a q-carousel instead of loading only when it shows for the...
Read more >Lazy Loading Images – The Complete Guide - ImageKit.io
The general concept of lazy loading images in <img> tag; Trigger image load using Javascript events; Using Intersection Observer API to ...
Read more >Lazy Loading Images with Vue.js Directives and Intersection ...
vue . In the component template, we'll use a figure tag that contains our image — the image tag itself will receive the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
B-Carousel-slide code is at https://github.com/bootstrap-vue/bootstrap-vue/blob/dev/lib/components/carousel-slide.vue
You can just replace
<img ...>
above with<b-img-lazy ...>
but you should set the width and height of the original image on b-img-lazy so that the carousel will be sized correctly (as carousel itself doesn’t have a defined siz, and if a size for image is set, it only applies to the image specified via the img-src props. All of your slide images should be the same dimensions, and should have the fluid or fluid-grop prop set.Seems that this works fine, no need for
setInterval()
: