feat(Uploader): support avif image format (#11655)

This commit is contained in:
chenxueli 2023-03-09 09:31:56 +08:00 committed by GitHub
parent e6fd665707
commit c88f457e84
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);