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 354 forks source link

Breakpoint change/feature -request #77

Closed dinbror closed 8 years ago

dinbror commented 8 years ago

To avoid redundancy I'm bundling all the issues and pull requests that is about the wish to change how the breakpoints works today:

Issues:

74

67

57

42

Pull requests (thanks @andr3pt):

50

40

How the breakpoints works today:

The breakpoints are defined by the device width not the browser width. It means that it’ll look at your screen width which won’t change when you resize your browser window. The reason why I’m looking at the device width and not the width is that I don’t want to load multiple image sources for the same image when you resize (multiple server request per image). And if you have a big screen but the initial width of your browser window is something small I don’t want to upscale a low res image when you resize it up.

The future

I'll look into a bigger refactoring of the code where I of course will take all your wishes into consideration. I see your point and I am not sure I can continue with not implementing it :smile:

Keep up all your good suggestions and any help is appreciated.

dinbror commented 8 years ago

The "Breakpoints" feature is marked as obsolete in version 1.6.0. Use srcset and/or the picture element instead

iamrobert commented 4 years ago

picture element responsive example: http://dinbror.dk/blazy/examples/?ref=blog