Git Product home page Git Product logo

Comments (11)

alex-phillips avatar alex-phillips commented on August 15, 2024 1

PR submitted. This will also make mobile performance much better as well as saving on bandwidth.

from lychee-front.

ildyria avatar ildyria commented on August 15, 2024

I like the idea. What would be the result in the sense of how would it interact with e.g. the Justified layout?
Would the pictures just bee filled with grayed placed holder until you actually scroll to them?
Would you still be able to load the full page little by little, e.g. once the first batch of thumbnail is received you query for the next batch?

By lazy load do you mean that the thumbnail don't appear until they are scrolled over (like facebook)? If so do you think this it possible to have it as a setting to enable (either via the more... or via an actual toggle button)?

from lychee-front.

alex-phillips avatar alex-phillips commented on August 15, 2024

What I'm experimenting with now is that the layout and page load would be exactly the same but the "image" would be a blank placeholder until you scrolled to it, yes. Not sure if this would be a config option you can toggle or not, that depends on the library I use. Should that be a requirement as I look into doing this?

from lychee-front.

ildyria avatar ildyria commented on August 15, 2024

not necessarily a requirement, but if the page still load completely while you are not scrolling (like first load the part you are scrolling and then load the rest) then I think it is fine.

One of the use case is you want to show a specific picture to someone but you don't really remember where it is in your album aside from it is in the bottom. How would that work with the lazy loading? :)

from lychee-front.

alex-phillips avatar alex-phillips commented on August 15, 2024

How would you normally do that now? Just jump all the way to the bottom?

from lychee-front.

ildyria avatar ildyria commented on August 15, 2024

yup and let firefox / chrome / IE load those pictures first. :)

from lychee-front.

ildyria avatar ildyria commented on August 15, 2024

On the other hand it takes my browser about 1.2 s to fully load this page with 472 pictures : https://photography.viguier.nl/gallery#1551392811988

from lychee-front.

alex-phillips avatar alex-phillips commented on August 15, 2024

Right, so with what I'm doing, if you just hit "page down" then it will jump to the bottom of the page and only load those images. It will probably load the ones at the top first as well since the page loads at the top, but you skip over the ones in the middle so they shouldn't get loaded.

I'm about to submit a PR. Give it a test drive and let me know what you think.

from lychee-front.

ildyria avatar ildyria commented on August 15, 2024

👍

from lychee-front.

kamil4 avatar kamil4 commented on August 15, 2024

@ildyria FYI, your gallery page took 28.85s to load for me... And that's with a >100Mbps download link. So I certainly think that what @alex-phillips proposes has value 😄

from lychee-front.

ildyria avatar ildyria commented on August 15, 2024

😄

from lychee-front.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.