From 2fdb15c76096dd03506c1c981efbf4a58e92062e Mon Sep 17 00:00:00 2001 From: Dominik Pschenitschni Date: Sun, 3 Nov 2024 15:18:47 +0100 Subject: [PATCH] feat: webp and avif attachment previews inspired by https://kolaente.dev/vikunja/vikunja/pulls/2770 --- frontend/src/models/attachment.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/models/attachment.ts b/frontend/src/models/attachment.ts index 2e697f4ea..8cd610b20 100644 --- a/frontend/src/models/attachment.ts +++ b/frontend/src/models/attachment.ts @@ -5,7 +5,7 @@ import type { IUser } from '@/modelTypes/IUser' import type { IFile } from '@/modelTypes/IFile' import type { IAttachment } from '@/modelTypes/IAttachment' -export const SUPPORTED_IMAGE_SUFFIX = ['.jpeg', '.jpg', '.png', '.bmp', '.gif'] +export const SUPPORTED_IMAGE_SUFFIX = ['.jpeg', '.jpg', '.png', '.bmp', '.gif', '.webp', '.avif'] export function canPreview(attachment: IAttachment): boolean { return SUPPORTED_IMAGE_SUFFIX.some((suffix) => attachment.file.name.toLowerCase().endsWith(suffix))