Troy-Yang / hexo-lazyload-image

lazyload image plugin for Hexo.
https://www.npmjs.com/package/hexo-lazyload-image
MIT License
82 stars 10 forks source link

Bug:Picture in the sidebar is always loading #19

Closed glazec closed 4 years ago

glazec commented 4 years ago

I am use latest chrome. There is no error appeared in the console.

image

Troy-Yang commented 4 years ago

Could you please try to config onlypost as true?

The reason that the avator can't be handled is because it is hidden by default. In that case, the loader can't detect whether the image should be shown by scroll bar or will be shown by manualy click.

glazec commented 4 years ago

这样可以解决问题。但是这样做的话就意味着我主页上的图片就不能懒加载了

wuzehv commented 4 years ago

@Troy-Yang 作者你好,onlypost配置为true,文章详情页正常,列表页未生效,查看列表页源代码img标签没有添加data-original属性,也执行了hexo clean && hexo g,请问是什么原因呢?

网站链接:https://liangjun.work/page/2/

Troy-Yang commented 4 years ago

@wuzehv 我看你网站已经没用hexo了? @glazec 你说的对,但是对于这种被代码隐藏的图片,这个库只会在滚动的时候才会替换,如果只有这一张图片,你可以在页面load过后,把这张图片href手动替换为data-original上的。

wuzehv commented 4 years ago

@Troy-Yang 感谢回复,又折腾hugo去了