banthagroup / fslightbox-react

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

Problem: images link without extension #234

Open codegeous opened 1 year ago

codegeous commented 1 year ago

Hi.

I'm using Amazon S3 as storage for images. The problem is that when you link an image without an extension, 'Invalid Source' is being shown.

https://s3.eu-west-2.amazonaws.com/account-prod/2e94b1aa-0c88-438a-b5d1-5e38e6b2cbc9

It works fine for setting images as img.src or background-image.

But unfortunately not working with baguetteBox.js, look like it does not recognize it as an image. Would you happen to have any idea how to make it work ?

I made a pen with problems, where you can find regular approaches, and without extension.

image
OlivierLESAGE commented 1 year ago

Hi, If you add type={"image"} in FsLightbox component props it will fix the problem i think