Replies: 8 comments 15 replies
-
@dmoKruso i am facing the same issue, next/image only cares only on its loading=(priority/lazy).Did you find any solution? |
Beta Was this translation helpful? Give feedback.
-
Having this issue too. We have galleries with 100 plus images so its kind of an issue |
Beta Was this translation helpful? Give feedback.
-
@dmoKruso I have the same problem with loadPrevNext. But I also can't get lazy loading to work after deployment to Vercel. I added className="swiper-lazy" but it is still the same. When deployed it throws:
Did you find any solutions? |
Beta Was this translation helpful? Give feedback.
-
Ok, I have been doing some testing.... In my situation, it seems like lazy loading is being broken by the transition (fade). Disabling the transition fixed the issue. Im guessing that with the fade animation, all images are in viewport and therefore all images are loaded instantly. |
Beta Was this translation helpful? Give feedback.
-
Have you tried using Lazy module? import SwiperCore, { Lazy } from "swiper"
SwiperCore.use([Lazy]) |
Beta Was this translation helpful? Give feedback.
-
As of Swiper v9.0.0, adding loading="eager" is the only way for it to work. |
Beta Was this translation helpful? Give feedback.
-
Managed to get lazy loading working with fade effect on images by setting them to
|
Beta Was this translation helpful? Give feedback.
-
I am having an issue when adding lazy loading with next js :
Swiper version 11.1.0 |
Beta Was this translation helpful? Give feedback.
-
Verify canary release
Provide environment information
Not able to run this... It says the folder info doesn't exist. Seems the wrong command.
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
Describe the Bug
I've a slide of images using Swiper.js library and next/previous images just loads when they kick in, when the slide goes to the next/previous it should be already loaded.
So, basically, when I try to use lazy load from swiper, so it can load the next and previous image from a slide before it slides, it doesn't work with next image. Would be great if we could add swiper requirements:
To bypass this issue, I added loading = eager to next image, so it can load right away.
Expected Behavior
I was expecting a way to add data-src, data-srcset and data-background
To Reproduce
Just install Swiper.js, create a slide of images with next image component with lazy load enabled on next image and even with swiper lazy load enabled to get next/prev images:
Beta Was this translation helpful? Give feedback.
All reactions