Re-render issue: Masonry Grid implementation in Next.js
Hello,
I've been facing this issue for a while now, I have a masonry grid that renders images from an external source, and when the image source is broken, I set the source to a default image that shows the image is broken.
Now every time I scroll, the image starts loading again (because I have a shimmer effect flash for a sec), and it doesn't have to be a big scroll, it could be as little as little as a few pixels (~10px).
On Firefox - All the images reload
On Chrome (or Chromium based browsers) - Just the broken images load again
Here is the code to the customized
Can anyone help me understand what might be going on?
Thanks
I've been facing this issue for a while now, I have a masonry grid that renders images from an external source, and when the image source is broken, I set the source to a default image that shows the image is broken.
Now every time I scroll, the image starts loading again (because I have a shimmer effect flash for a sec), and it doesn't have to be a big scroll, it could be as little as little as a few pixels (~10px).
On Firefox - All the images reload
On Chrome (or Chromium based browsers) - Just the broken images load again
Here is the code to the customized
next/image component I'm using below;Can anyone help me understand what might be going on?
Thanks