From c0c77157261f8f26fa9f94cbd404ad332bbd6aae Mon Sep 17 00:00:00 2001 From: saqimtiaz Date: Sun, 26 Jan 2025 11:14:14 +0100 Subject: [PATCH] feat: support for avif images --- boot/boot.js | 1 + core/modules/parsers/imageparser.js | 1 + 2 files changed, 2 insertions(+) diff --git a/boot/boot.js b/boot/boot.js index ab403aa5a..25a39cacc 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -2463,6 +2463,7 @@ $tw.boot.initStartup = function(options) { $tw.utils.registerFileType("image/webp","base64",".webp",{flags:["image"]}); $tw.utils.registerFileType("image/heic","base64",".heic",{flags:["image"]}); $tw.utils.registerFileType("image/heif","base64",".heif",{flags:["image"]}); + $tw.utils.registerFileType("image/avif","base64",".avif",{flags:["image"]}); $tw.utils.registerFileType("image/svg+xml","utf8",".svg",{flags:["image"]}); $tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); diff --git a/core/modules/parsers/imageparser.js b/core/modules/parsers/imageparser.js index a964a4ba8..d594803b2 100644 --- a/core/modules/parsers/imageparser.js +++ b/core/modules/parsers/imageparser.js @@ -40,6 +40,7 @@ exports["image/gif"] = ImageParser; exports["image/webp"] = ImageParser; exports["image/heic"] = ImageParser; exports["image/heif"] = ImageParser; +exports["image/avif"] = ImageParser; exports["image/x-icon"] = ImageParser; exports["image/vnd.microsoft.icon"] = ImageParser;