Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues lazy loading images in gallery #52

Closed
jweb89 opened this issue Jul 28, 2021 · 9 comments
Closed

Issues lazy loading images in gallery #52

jweb89 opened this issue Jul 28, 2021 · 9 comments
Assignees
Labels
bug Something isn't working good first issue Good for newcomers
Milestone

Comments

@jweb89
Copy link

jweb89 commented Jul 28, 2021

Describe the bug
A clear and concise description of what the bug is.

Sometimes lazy loaded images don't load. From what I can see it doesn't get switched to a real url when swiping or clicking the url so when the image is actually on screen this causes the gallery to try to load the image from https://{path}/[object%20Object]

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error
    Not exactly sure how to reproduce consistently, but here is an example

Website has been updated to that issue is no longer present
This is our staging server. The login is dev/dev so you can see the behavior. I tried to do some debugging but couldn't find exactly what was causing the issue. The urls are definitely valid. This doesn't happen if lazy loading is disabled

Expected behavior
A clear and concise description of what you expected to happen.
Should lazy load the image

Screenshots
If applicable, add screenshots to help explain your problem.
image

Desktop (please complete the following information):

  • OS: [e.g. iOS] windows 10
  • Browser [e.g. chrome, safari] chrome
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6] iphone xr
  • OS: [e.g. iOS8.1] latest
  • Browser [e.g. stock browser, safari] safari
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

This does happen on my iphone as well. See specs above.

@yifaneye yifaneye self-assigned this Jul 29, 2021
@yifaneye yifaneye added bug Something isn't working good first issue Good for newcomers labels Jul 29, 2021
@yifaneye yifaneye added this to To do in react-gallery-carousel via automation Jul 29, 2021
@yifaneye yifaneye added this to the v0.2.4 milestone Jul 29, 2021
@yifaneye
Copy link
Owner

Hi @jweb89 ! Thank you for raising this issue up! 😃

May I know which version of the package are you using?

@jweb89
Copy link
Author

jweb89 commented Jul 29, 2021

Using the latest version which was done from the cloned repo since I had the issue using it as node module with next js. I was also able to sometimes get the next js example repo you provided to produce the issue but it was never consistent. From what I can see the image src isn't getting updated before the image actually tried to be fetched and then it just defaults back to the placeholder/error image

@yifaneye
Copy link
Owner

I see. I had some custom implementation of the lazy loading behaviour in order to support all browsers. I will continue to investigate it.

@rhayart
Copy link

rhayart commented Oct 8, 2021

Hey. Any news on this ? Im having the same issue. Images load successfully but i got a 404 in console with that "[object%20object]".
Disabling "shouldLazyLoad" fix it for me too.
Issue start appearing when i migrate my app from Next.js 10 to 11.

@yifaneye
Copy link
Owner

Sorry, I still have not figured out the cause yet.

@yifaneye yifaneye mentioned this issue Dec 18, 2021
@yifaneye
Copy link
Owner

I think I fixed the issue in v0.2.7 while fixing issue #51. Please feel free to comment down below if this issue is still there after upgrading.

react-gallery-carousel automation moved this from To do to Done Dec 18, 2021
@yifaneye
Copy link
Owner

@jweb89 @rhayart I am wondering if you have tried the latest version?

@rhayart
Copy link

rhayart commented Dec 21, 2021

Hi ! I just test the v0.2.7 and it seems to be ok now. Good job, thanks !

@yifaneye
Copy link
Owner

@rhayart Awesome! My pleasure!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Development

No branches or pull requests

3 participants