Fix for Lightbox not taking width of image

I some cases with the new jQeury in combination with Bootstrap the width of Lightbox is not setting according to width from the image.