ashleydw / lightbox

A lightbox gallery plugin for Bootstrap
http://ashleydw.github.io/lightbox
MIT License
1.85k stars 1.3k forks source link

Image is presented smaller than actual size / width attribute ignored when using remote image #280

Closed bogal closed 6 years ago

bogal commented 6 years ago

With the following link:

< a data-toggle="lightbox" data-type="image" data-remote="link/to/image/" >< i class = "fa fa-camera" style = "padding-right: 0.5em;">< / i>image filename< / a>

..the width of the image is ignored. The modal is opening with the images at a fraction of its actual size (maybe 1/4 to 1/2). I don't know how to force the modal to open to the size of the image, but i found that setting the width attribute in the link made no difference, nor does setting the attribute during the initialision of the ekko lightbox:

  • with the above link parameters, width is ignored.

Using Lightbox 4.0.2 on bootstrap 3.3 (v5.1.0 of lightbox clashes with this version of bootstrap, with an "undefined method" when loading an image. Unable to update to bootstrap 4). (ps, would have asked this on SO, but no idea what to tag as)

ashleydw commented 6 years ago

You need to post a full example, otherwise look into data-width and data-height