ApoorvSaxena / ApoorvSaxena/lozad.js
Not working erratically without min-width or min-height
Offen
- Vorherrschende Sprache
- JavaScript
- Sterne
- 7.5k
- Forks
- 435
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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?
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.