From 457508f1cd2c3098ac140ae1fa83bcad8c7e70b4 Mon Sep 17 00:00:00 2001 From: Takagi <1103069291@qq.com> Date: Wed, 7 Aug 2024 16:50:35 +0800 Subject: [PATCH] feat: support for previewing avif images in attachments (#6446) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit #### What type of PR is this? /kind feature /area ui /milestone 2.19.x #### What this PR does / why we need it: 支持在附件库中预览 `image/avif` 的图片。 #### Which issue(s) this PR fixes: Fixes #6320 #### Does this PR introduce a user-facing change? ```release-note 支持在附件库中预览 avif 类型的图片 ``` --- ui/src/utils/image.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/src/utils/image.ts b/ui/src/utils/image.ts index 7573e9a71..a92968cc3 100644 --- a/ui/src/utils/image.ts +++ b/ui/src/utils/image.ts @@ -5,6 +5,7 @@ export const imageTypes: string[] = [ "image/gif", "image/webp", "image/svg+xml", + "image/avif", ]; export function isImage(mediaType: string | undefined): boolean {