Skip to content

Commit

Permalink
Add support for webp, gif, bmp
Browse files Browse the repository at this point in the history
  • Loading branch information
demig00d committed Dec 16, 2023
1 parent b233fb8 commit 3d2a28d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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')
)
}

Expand Down

0 comments on commit 3d2a28d

Please sign in to comment.