First image not loading initially in Swiper with dir="rtl" in Next.js
shadizohari opened this issue · comments
Check that this is really a bug
- I confirm
Reproduction link
https://github.com/shadizohari/next-swiper
Bug description
When using Swiper in a Next.js project with dir="rtl", the first image in the slider does not load initially. However, when i navigate to the next slide and then return to the first slide, it loads. This problem is resolved by setting loading="eager", but this approach sacrifices image optimization.
Expected Behavior
The first image in the Swiper slider should load when the component is rendered, even with dir="rtl".
Actual Behavior
The first image does not load initially in the Swiper slider with dir="rtl.
Reloading occurs when returning to the first image after navigating to other slides.
Setting loading="eager" resolves the initial loading issue but sacrifices image optimization.
Swiper version
11.1.3
Platform/Target and Browser Versions
Chrome
Validations
- Follow our Code of Conduct
- Read the docs.
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
- Make sure this is a Swiper issue and not a framework-specific issue
Would you like to open a PR for this bug?
- I'm willing to open a PR
Search issue first before opening a new one