Skip to content

Commit

Permalink
feat: support for previewing avif images in attachments (halo-dev#6446)
Browse files Browse the repository at this point in the history
#### 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 halo-dev#6320 

#### Does this PR introduce a user-facing change?
```release-note
支持在附件库中预览 avif 类型的图片
```
  • Loading branch information
LIlGG authored Aug 7, 2024
1 parent 4a4f8b6 commit 457508f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ui/src/utils/image.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export const imageTypes: string[] = [
"image/gif",
"image/webp",
"image/svg+xml",
"image/avif",
];

export function isImage(mediaType: string | undefined): boolean {
Expand Down

0 comments on commit 457508f

Please sign in to comment.