ApoorvSaxena / ApoorvSaxena/lozad.js
Images not loading (data-loaded tag is injected, but no src tag)
未关闭
- 主要语言
- JavaScript
- 星标
- 7.5k
- 派生
- 435
- PR 合并指标
- 30 天内没有已合并 PR
描述
I have installed lozad.js, but no images are loaded. lozad.js has been installed through npm.
Here’s the JS code.
```
const observer = lozad('.lozad', {
load: function(el) {
console.log('Loading element');
console.log(el);
},
});
observer.observe();
```
And the HTML markup.
``
lozad.js is triggered. I get console logs with the right elements, and `data-loaded="true"` is injected in the appropriate `` tag. But no `src` is injected, no image is loaded.
The `` tag looks like this once lozad.js is triggered.
``
I am lost here, any idea?
贡献指南
评估
这个 Issue 还没有评估数据。