From c88f457e8495ee7447287d1e8e700d42f0d1a1f6 Mon Sep 17 00:00:00 2001 From: chenxueli <31118423+zjcxl@users.noreply.github.com> Date: Thu, 9 Mar 2023 09:31:56 +0800 Subject: [PATCH] feat(Uploader): support avif image format (#11655) --- packages/vant/src/uploader/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vant/src/uploader/utils.ts b/packages/vant/src/uploader/utils.ts index 0db08b5fe..8057b9b16 100644 --- a/packages/vant/src/uploader/utils.ts +++ b/packages/vant/src/uploader/utils.ts @@ -63,7 +63,7 @@ export function filterFiles( return { valid, invalid }; } -const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; +const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg|avif)/i; export const isImageUrl = (url: string): boolean => IMAGE_REGEXP.test(url);