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
Images served without a file extension are not displayed properly #362
Comments
If you know for sure that you want to load images into Featherlight, you can set the attribute data-featherlight-type="image". |
Sorry I never chimed back on this. I don't see anything special in the example |
I probably pasted he wrong jsfiddle sorry ! I will try and replicate the issue and post a proper link. |
I can't believe I missed this in the docs. It seems to work just fine, as per this JSFiddle. It would still be possible to automatically enforce the data type based on content-type in response headers, if provided. |
Since content is determined with regex, static files that are not served with their file extension (either as a base64 image, or served with a given route) are not displayed properly.
Example
Featherlight could check the response headers through jQuery's XHR parameter instead of analyzing the URL structure to determine the content-type ; there could also be a way to force the expected content ignoring the regex matches. I may have misunderstood the docs but couldn't find a way to do this yet.
The text was updated successfully, but these errors were encountered: