From 792a8c3a9c81b2931600876de831565d94edd753 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 25 Apr 2026 10:04:15 +0200 Subject: [PATCH] LibWeb: Accept image/avif as a supported image MIME type The list previously omitted AVIF even though we ship a working AVIFImageDecoderPlugin, which meant candidates and image-set(... type("image/avif")) candidates were unconditionally skipped. --- Libraries/LibWeb/HTML/SupportedImageTypes.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Libraries/LibWeb/HTML/SupportedImageTypes.cpp b/Libraries/LibWeb/HTML/SupportedImageTypes.cpp index 081b69c259f..f35d5c10500 100644 --- a/Libraries/LibWeb/HTML/SupportedImageTypes.cpp +++ b/Libraries/LibWeb/HTML/SupportedImageTypes.cpp @@ -14,7 +14,8 @@ bool is_supported_image_type(StringView type) return true; if (!type.starts_with("image/"sv, CaseSensitivity::CaseInsensitive)) return false; - return type.equals_ignoring_ascii_case("image/bmp"sv) + return type.equals_ignoring_ascii_case("image/avif"sv) + || type.equals_ignoring_ascii_case("image/bmp"sv) || type.equals_ignoring_ascii_case("image/gif"sv) || type.equals_ignoring_ascii_case("image/vnd.microsoft.icon"sv) || type.equals_ignoring_ascii_case("image/x-icon"sv)