From 4d9c68d7419a5763b2094e0f3efbe57afe97eba4 Mon Sep 17 00:00:00 2001 From: enes Date: Thu, 17 Oct 2024 18:06:23 +0200 Subject: [PATCH] fix(image-validation): add more image types to regex --- src/utils/url.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/url.ts b/src/utils/url.ts index bb9e5e6..3a46f13 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -56,7 +56,7 @@ export const isValidUrl = (url: string) => { } export const isValidImageUrl = (url: string) => { - const regex = /\.(jpeg|jpg|gif|png)$/ + const regex = /\.(jpeg|jpg|gif|png|ico|bmp|webp|avif|jxl)$/ return regex.test(url) }