Skip to content

Commit

Permalink
Update featherlight.js
Browse files Browse the repository at this point in the history
Extended the regex of image extensions in contentFilters with "webp" so that featherlight can also work with WebP images. This change makes it work on e.g. on a Grav CMS installation with grav-featherlight-plugin and WebP images.
  • Loading branch information
waseigo authored and marcandre committed Jan 16, 2021
1 parent 41506a7 commit ea47cb6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/featherlight.js
Expand Up @@ -392,7 +392,7 @@
process: function(elem) { return this.persist !== false ? $(elem) : $(elem).clone(true); }
},
image: {
regex: /\.(png|jpg|jpeg|gif|tiff?|bmp|svg)(\?\S*)?$/i,
regex: /\.(png|jpg|jpeg|gif|tiff?|bmp|svg|webp)(\?\S*)?$/i,
process: function(url) {
var self = this,
deferred = $.Deferred(),
Expand Down

0 comments on commit ea47cb6

Please sign in to comment.