dinbror / blazy

Hey, be lazy! bLazy.JS is a lightweight pure JavaScript script for lazy loading and multi-serving images. It's working in all modern browsers including IE7+.
http://dinbror.dk/blazy
MIT License
2.63k stars 355 forks source link

Is an 'alt' attribute required in img tags? #174

Closed robsch closed 4 years ago

robsch commented 5 years ago

My images don't get fetched and shown if I don't supply a non empty alt attribute. src is empty. Does it have anything to do with #155 - does the alt tag cause a min-height?

robsch commented 4 years ago

Seems so. If there is no initial height blazy does not work. Some text in the alt tag causes a certain heigt. But you can also create height with css: display: block; height: 100px;