Open ojathelonius opened 6 years ago
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.
If you know for sure that you want to load images into Featherlight, you can set the attribute data-featherlight-type="image".
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.