Answer the question
In order to leave comments, you need to log in
How to implement Lazy Load in React in Swiper Slider?
I tried to make a Lazy Load, but I can't figure out why the photos still don't load. Maybe someone knows what's wrong. The documentation describes only the version with HTML / JS.
Link to CodeSandbox
Answer the question
In order to leave comments, you need to log in
You need to import the Lazy module: . You didn't.
Connect it: . You didn't.
Indicate to the slider instance that lazy loading is required: . You didn't.
Add class to images , replace attribute with . Well, at least you have it. import { Lazy } from 'swiper';
swiper-lazy
src
data-src
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question