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

try breakpoints step by step, feature request #151

Open slavugan opened 7 years ago

slavugan commented 7 years ago

for example I have such breakpoints

    breakpoints: [{
              width: 360, // max-width
              src: 'data-src-xsmall'
        }, {
              width: 600,
              src: 'data-src-small'
        }, {
              width: 1024,
              src: 'data-src-medium'
        }, {
              width: 1366,
              src: 'data-src-large'
        }]

it would be nice to have an option to try breakpoints one after one. for example if image doesn't have data-src-xsmall Blazy should check for data-src-small and so on.