If you are detecting images or videos and an image is loaded with a query string, for example in wordpress with a plugin, the lightbox can default to a video iframe if your code is augmented to run videos.
Here is a fix to keep images from turning into iframes when they have a query string url:
SlickLightbox.prototype.detectImage = function(url) {
// Remove query string
url = url.split('?')[0];
// Returns true if it finds an image file extension
return url.match(/\.(jpeg|jpg|gif|png|webp)$/i) !== null;
};
Also added support for webp.