react-lazy-load-image-component
react-lazy-load-image-component copied to clipboard
It renders span tag instead of image tag
My code:
Hi, I have a problem with LazyLoadImage. the src attributes is the url of the image svg from cloud.
it's so weird. cause i tried like your scenario but my scripts is working well.
I have the exact same issue happing in one of my 3 environments. that all run the same code and I can't figure it out what's different.
I figured out my problem. The span was the placeholder, which never was replaced by an image because it wasn't in the viewport. In my case, the image was a 1x1 pixel which was loading in the overflow of a div. Making sure I put the pixel in a place that was actual visible solved the problem for me.