Codeinwp / Nivo-Lightbox-jQuery

A simple, flexible, responsive, retina-ready jQuery lightbox plugin.
http://dev7studios.com/nivo-lightbox
MIT License
157 stars 87 forks source link

JPG etc are not scaled properly - Fix #63

Open NielsLust opened 8 years ago

NielsLust commented 8 years ago

The Lightbox code only checks if the extension of the image is in lowercase.

Solution:

Change if(s.match(/\.(jpeg|jpg|gif|png)$/)!=null)

Into: if(s.match(/\.(jpeg|JPEG|jpg|JPG|gif|GIF|png|PNG)$/)!=null)

Solution found here: http://stackoverflow.com/questions/19961569/nivo-lightbox-adding-tags-to-image-to-make-them-iframes

Can someone please add this as pull request? Thanks!