ApoorvSaxena / ApoorvSaxena/lozad.js

Not working erratically without min-width or min-height

Open
#176 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7.5k
Forks
435
PR merge metrics
No merged PRs in 30d

Description

We have the following code placement in the bottom of our website

```



const observer = lozad('[data-src]');
observer.observe();

```

And it seems to work fine for me but some of our users reported the images are not loading at all and I couldn't produce it locally. I noticed those users may have older machines but I'm not sure if it's a factor

We then try add some css and it seems to work

```
img[data-src] {
min-width: 1px;
min-height: 1px;
}
```

here's the example of the image

```

```

Maybe we can update the README? What do you think?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.