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
125 stars 28 forks source link

Using google drive images Bootstrap 5 and Lightbox 403 error #34

Closed omdawe closed 1 year ago

omdawe commented 1 year ago

So im using google drive images and with the standard image link the image dont load and gives a 403 error.

<a href="https://drive.google.com/thumbnail?id=1n7l1sFnytkPLXF5SBjvaAs6srSjHgvWO&sz=w1080" data-toggle="lightbox" data-gallery="gallery" class="col-sm-4 img-fluid">
<img src="https://drive.google.com/thumbnail?id=1n7l1sFnytkPLXF5SBjvaAs6srSjHgvWO&sz=w300" class="img-fluid"></a>

A "fix" is to change the google link to https://lh3.googleusercontent.com/d/1n7l1sFnytkPLXF5SBjvaAs6srSjHgvWO=w1080 as its not the standard API from google drive so this "fix" might just be working temporarily

But the image dont get the img-fluid class so the full image is not fitted in to the lightbox.

trvswgnr commented 1 year ago

Hi @omdawe have you tried adding data-type="image" to the trigger element?

omdawe commented 1 year ago

ooo SHIT!! No i did not try that.. THAT WORKED! Thanks man!

trvswgnr commented 1 year ago

@omdawe lol no problem!