cloudinary / cloudinary_js

Cloudinary JavaScript library
MIT License
328 stars 224 forks source link

Lazy Load Offset #255

Closed taijuten closed 2 years ago

taijuten commented 4 years ago

Feature request for Cloudinary JS SDK

Please see https://github.com/cloudinary/cloudinary-react/issues/187.

It would be useful to be able to specify margin / offset for lazyloading imagery.

Explain your use case

Lazy loading images before the user sees them gives a better UX

Describe the problem you’re trying to solve

As above

Do you have a proposed solution?

At least when using Intersection Observer, a margin can be specified, as per here: https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API

patrick-tolosa commented 4 years ago

Hey @taijuten

Thanks for your suggestion, We're reviewing this internally and we'll update once we have news.

This somewhat relates to your other issue posted here: https://github.com/cloudinary/cloudinary-react/issues/187

taijuten commented 4 years ago

I have raised PR #258 which at least partially addresses this problem on browsers which support Native Lazyloading

patrick-tolosa commented 2 years ago

Hey @taijuten,

We appreciate both the issue being reported and a PR being submitted, Our team is currently focused on the next generation of Javascript SDKs.

We are in the process of completely rebuilding our responsive solution around modern frameworks, and Responsive will be part of the solution.

This is planned to be released relatively soon, so while your suggestion is indeed an improvement, we prefer releasing the new SDKs with the improved functionality.

The new SDK will have this functionality baked in.