From e381a6a864bebd79c7fb21ef0abc20a661f2b83a Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Sun, 18 Jul 2021 21:45:14 +0200 Subject: [PATCH] add support for AVIF image format Support for Googles new image format. https://caniuse.com/avif --- src/featherlight.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/featherlight.js b/src/featherlight.js index b18d946..db3a37e 100644 --- a/src/featherlight.js +++ b/src/featherlight.js @@ -392,7 +392,7 @@ process: function(elem) { return this.persist !== false ? $(elem) : $(elem).clone(true); } }, image: { - regex: /\.(png|jpg|jpeg|gif|tiff?|bmp|svg|webp)(\?\S*)?$/i, + regex: /\.(png|jpg|jpeg|gif|tiff?|bmp|svg|webp|avif)(\?\S*)?$/i, process: function(url) { var self = this, deferred = $.Deferred(),