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

Question about breakpoint #123

Closed benzon closed 7 years ago

benzon commented 7 years ago

Hi,

Just wondering what the thought behind removing breakpoint is?

The reason I am asking is that’s it’s more relevant than ever, serving images that fit the browser view, instead of delivering bigger images then needed.

The way users use the internet today is very different than a few years back, they might start of in portrait mode, and then turn to landscape and if blazy was keeping abit track on this, you would be able to use different image sizes according to that if that makes sence?

That way bLazy would help quite a lot making sure you give the user the best experience in general, maybe even make it possible to set width and height for a breakpoint, so it fills out those html properties?

dinbror commented 7 years ago

Hey @benzon.

Why not use srcset and/or the picture element instead? Blazy also supports lazy load of these types. I want to keep the script as small as possible and my plan was to remove the breakpoint feature but since a lot of people are using it (e.g. for background images) I have keept it there

dinbror commented 7 years ago

Friendly ping @benzon. Can I close it?

benzon commented 7 years ago

Sure :)

Tried playing with srcset, and I can’t get it to work like intended with Blazy

Could you drop me a hint or two on this matter? It’s okay if your answer is Danish hehe.

dinbror commented 7 years ago

@benzon Ok :) Hvad er dit problem? Hvad er det du ikke kan få til at virke? Har du set eksempel 1.4? http://dinbror.dk/blazy/examples/

benzon commented 7 years ago

Nok det jeg lige manglede, får lige kigget på det, har haft alt alt for travlt til lige og få svaret tilbage beklager jeg.