From 7442e450aabbeee5dd142e0aab6d021d7d25fb18 Mon Sep 17 00:00:00 2001 From: Vinzenz Hersche Date: Thu, 25 Aug 2022 15:15:40 +0200 Subject: [PATCH] Add webp-support As the tinypng-backend supports webp, i checked my change already and it looked fine --- tinypng-cli.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tinypng-cli.js b/tinypng-cli.js index 631aaf8..02ba6a9 100644 --- a/tinypng-cli.js +++ b/tinypng-cli.js @@ -127,11 +127,11 @@ if (argv.v || argv.version) { glob.sync( file + (argv.r || argv.recursive ? "/**" : "") + - "/*.+(png|jpg|jpeg|PNG|JPG|JPEG)" + "/*.+(png|jpg|jpeg|PNG|JPG|JPEG|webp|WEBP)" ) ); } else if ( - minimatch(file, "*.+(png|jpg|jpeg|PNG|JPG|JPEG)", { + minimatch(file, "*.+(png|jpg|jpeg|PNG|JPG|JPEG|webp|WEBP)", { matchBase: true }) ) {