Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lightbox doesn't work if target has an uppercase file extension #134

Open
afroewis opened this issue Dec 4, 2020 · 2 comments
Open

Lightbox doesn't work if target has an uppercase file extension #134

afroewis opened this issue Dec 4, 2020 · 2 comments

Comments

@afroewis
Copy link

afroewis commented Dec 4, 2020

Hi,

Thanks for the library. It's great.

This doesn't work:

<a data-fslightbox href="img/nov-20/Forstmulchen%20(Gross).JPG">
                <img src="img/nov-20/Forstmulchen%20(Handy).JPG">
            </a>

This works (given that you rename the file and make the JPG lowercase)

<a data-fslightbox href="img/nov-20/Forstmulchen%20(Gross).jpg">
                <img src="img/nov-20/Forstmulchen%20(Handy).JPG">
            </a>

In the first case, it displays the message "Invalid source" when opening the lightbox, even though there is no reason uppercase file extensions should be disallowed.

If you confirm, I'm happy to submit a PR.

@piotrzdziarski
Copy link
Collaborator

It's strange, for me it works correctly. Maybe you just don't have image with uppercased extension?
If you have disable local storage and try again, maybe it's some cache issue:

fsLightbox.props.disableLocalStorage = true;

@viniciussbs
Copy link

I've had the same issue with a URL with querystring. Something like https://cdn.example.com/images/bg.jpg?v=1234567890. Since, in my case, I only have images, the workaround is to pass data-type="image".

<a data-fslightbox href="img/nov-20/Forstmulchen%20(Gross).JPG" data-type="image">
  <img src="img/nov-20/Forstmulchen%20(Handy).JPG">
</a>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants