From 3d2a28d526ff9f3e4ca6b3b0f81e10ed9c62038a Mon Sep 17 00:00:00 2001 From: demig00d <28487425+demig00d@users.noreply.github.com> Date: Sat, 16 Dec 2023 13:00:35 +0300 Subject: [PATCH] Add support for webp, gif, bmp --- README.md | 2 +- lib/src/index.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 89a727d..ce7ab32 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ You're more than welcome to submit PRs, and I will gladly help and mentor :) Supported files: -- Images (`.png`, `.jpg`, `.jpeg`) +- Images (`.png`, `.jpg`, `.jpeg`, `.webp`, `.gif`, `.bmp`) - PDFs (`.pdf`) ### Limitations diff --git a/lib/src/index.ts b/lib/src/index.ts index b9a0936..8d2f59e 100644 --- a/lib/src/index.ts +++ b/lib/src/index.ts @@ -34,7 +34,8 @@ function isFilePDF(path: string): boolean { function isFileImage(path: string): boolean { return ( - path.endsWith('.png') || path.endsWith('.jpg') || path.endsWith('.jpeg') + path.endsWith('.png') || path.endsWith('.jpg') || path.endsWith('.jpeg') || + path.endsWith('.webp') || path.endsWith('.gif') || path.endsWith('.bmp') ) }