nuxt / ui

A UI Library for Modern Web Apps, powered by Vue & Tailwind CSS.

Home Page:https://ui.nuxt.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lazy Loading Images for Carousel

ilrein opened this issue · comments

commented

Description

Looks like the Carousel component renders all the images immediately. Is it possible to add lazy loading support?

I have a usecase for a pinterest style website that uses carousels. It would be great to reduce the initial footprint when rendering 30+ images in a single page.

Hi @ilrein have you tried loading=lazy? Else you can probably cook up something simple using observer api. You should probably also look at Nuxt Image. Lmk if you need more help.

commented

Oh of course. It's just a slot which can be filled with NuxtImg. Silly me.

Thank you @moshetanzer !