From e2e7d2d9a5fa9e7adda24dc69cdbd49d23c51045 Mon Sep 17 00:00:00 2001 From: Kate Higa <16447748+khiga8@users.noreply.github.com> Date: Mon, 11 Aug 2025 17:30:29 -0400 Subject: [PATCH 1/2] Support webp image format in isImage method Added 'image/webp' to the list of accepted image types. --- src/attachment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/attachment.ts b/src/attachment.ts index 63f8245..2d32574 100644 --- a/src/attachment.ts +++ b/src/attachment.ts @@ -40,7 +40,7 @@ export default class Attachment { } isImage(): boolean { - return ['image/gif', 'image/png', 'image/jpg', 'image/jpeg', 'image/svg+xml'].indexOf(this.file.type) > -1 + return ['image/gif', 'image/png', 'image/jpg', 'image/jpeg', 'image/svg+xml', 'image/webp'].indexOf(this.file.type) > -1 } isVideo(): boolean { From 25563c666177bcb1ccc6c23f92977187b08dac48 Mon Sep 17 00:00:00 2001 From: Kate Higa <16447748+khiga8@users.noreply.github.com> Date: Mon, 11 Aug 2025 17:35:07 -0400 Subject: [PATCH 2/2] Run lint --- src/attachment.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/attachment.ts b/src/attachment.ts index 2d32574..2d7f4fd 100644 --- a/src/attachment.ts +++ b/src/attachment.ts @@ -40,7 +40,9 @@ export default class Attachment { } isImage(): boolean { - return ['image/gif', 'image/png', 'image/jpg', 'image/jpeg', 'image/svg+xml', 'image/webp'].indexOf(this.file.type) > -1 + return ( + ['image/gif', 'image/png', 'image/jpg', 'image/jpeg', 'image/svg+xml', 'image/webp'].indexOf(this.file.type) > -1 + ) } isVideo(): boolean {