about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAndré Fernandes <rutxo1995@gmail.com>2025-02-05 14:54:52 +0000
committerGitHub <noreply@github.com>2025-02-05 14:54:52 +0000
commit9433975984e71fc69ea38e3c0180b9e0d1c15ae7 (patch)
treeddef3be9de15731b2420ac48edcbdf895dd3a0c5
parentc3d732a76fd51127c7488fd71cb690b6ad3089b1 (diff)
downloadvoidsky-9433975984e71fc69ea38e3c0180b9e0d1c15ae7.tar.zst
Adding webp to regex list. Added function return type for consistency with the rest of the functions (#7649)
-rw-r--r--src/lib/media/util.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/media/util.ts b/src/lib/media/util.ts
index 73f974874..36b342204 100644
--- a/src/lib/media/util.ts
+++ b/src/lib/media/util.ts
@@ -8,8 +8,8 @@ export function getDataUriSize(uri: string): number {
   return Math.round((uri.length * 3) / 4)
 }
 
-export function isUriImage(uri: string) {
-  return /\.(jpg|jpeg|png).*$/.test(uri)
+export function isUriImage(uri: string): boolean {
+  return /\.(jpg|jpeg|png|webp).*$/.test(uri)
 }
 
 export function blobToDataUri(blob: Blob): Promise<string> {