twobin/react-lazyload

[Question] How to display placeholder when the image is still be fetched while visible in the viewport?

nhanpdnguyen opened this issue · 0 comments

Hi guys, I was using this library to lazy-load my images, I was also using my custom placeholder component.

As I observe, as soon as the images are in the viewport, the placeholder will be immediately replaced with the img tag. However, in my case, my image fetching is slow, so the image goes blank for a while until the fetching done and the browser paints it.

So my question is there any way to show the placeholder until the image is completely fetched?

Thank you