twobin / twobin/react-lazyload

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

Open
#341 0 comments 3 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5.9k
Forks
485
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.