trvswgnr / bs5-lightbox

A pure JS lightbox gallery plugin for Bootstrap 5 based on the Modal and Carousel components
https://trvswgnr.github.io/bs5-lightbox/
MIT License
129 stars 28 forks source link

data-type="image" ignored #6

Closed kajusK closed 2 years ago

kajusK commented 2 years ago

When I try to force data type (image with extension unknown to the lightbox - JPG in capitals) by data-type="image", the lightbox is forced to be rendered in an iframe, causing incorrect image alignment.

Basically I'm trying to do the same as mentioned in https://trvswgnr.github.io/bs5-lightbox/#force-type, but the option is ignored (this happens also in the linked example).

djonik1562 commented 2 years ago

I have same problem. 2022-01-24_10-44-49

And photo displays in little window. How i can do normal photo view?

trvswgnr commented 2 years ago

Thanks for bringing this to my attention, I'll try to recreate ASAP.

mihakot commented 2 years ago

@trvswgnr Perhaps if you bring the file name with the extension to lowercase and check it, then the problem will disappear.

georgegoudie commented 2 years ago

Yeo data-type seems to be completely ignored

trvswgnr commented 2 years ago

This issue has been fixed in v1.7.9

hovi commented 2 years ago

Hi,

just came across the same issue. I tried it with 1.7.9, 1.7.10 and still facing the same problem. Also I couldn't find non-minified .js bundle. Would be helpful to provide that - it would make it easier for me to debug without setting up the project.

trvswgnr commented 2 years ago

@hovi can you provide an example of your code? It seems to be working as expected in the documentation example. I’ll add a non-minified bundle in the next release.

hovi commented 2 years ago

@trvswgnr you can see it here: https://www.honor.cz/en/detail/3779/ Or choose any other from the list: https://www.honor.cz/en/nase-nabidka/

trvswgnr commented 2 years ago

@hovi added fix in v1.7.11. You also shouldn't need to force type on urls with '.JPG', since check for supported image types is now case-insensitive.

hovi commented 2 years ago

Very good. I updated the version and it's fine now, thanks. You didn't add non-minified bundle though.

trvswgnr commented 2 years ago

@hovi no, unfortunately that will have to be in the next minor release where I overhaul my build process.