Skip to content

When opening the LightBox, it loads every image. #26

@spaceguy101

Description

@spaceguy101

On such implementation

      <Lightbox
        currentImageIndex={currentImage}
        setCurrentIndex={setCurrentImage}
        isOpen={viewerIsOpen}
        onClose={() => closeLightbox()}
        images={photoGallery.photos}
      />

When viewerIsOpen is true, the modal opens and starts downloading every elements of images.

If there is a lot of elements, it slows down the browser a lot, especially on mobile.

Is there a way to download only the visible image or maybe lazy load only the few next images ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions