banthagroup / fslightbox-react

Basic version of Fullscreen Lightbox for React.js. Website: https://fslightbox.com/react
MIT License
169 stars 23 forks source link

[Pro] Thumbs breaks if custom image is provided but not found on server #233

Open loltag22 opened 1 year ago

loltag22 commented 1 year ago

Considering the example from the official guide:

<FsLightbox
    sources={[
        "/Images/1.jpg",
        "/Images/2.jpg",
        "https://www.youtube.com/watch?v=3nQNiWdeH2Q",
        "/Videos/1.mp4"
    ]}
    thumbs={[
        null, // The thumb will be created automatically.
        "/Images/Thumbs/2.jpg", // The default thumb is being overwritten.
        "/Images/Videos_Thumbs/1.jpg",
        "/Images/Videos_Thumbs/2.jpg"
    ]}
/>

If for example "/Images/Thumbs/2.jpg" is not found on server, the loader over the thumbs section will never disappear.

Screenshot from 2023-03-16 11-07-19