diff --git a/boot/boot.js b/boot/boot.js index d6647884d..e5b608cae 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -1985,6 +1985,9 @@ $tw.boot.startup = function(options) { $tw.utils.registerFileType("image/jpeg","base64",[".jpg",".jpeg"],{flags:["image"]}); $tw.utils.registerFileType("image/png","base64",".png",{flags:["image"]}); $tw.utils.registerFileType("image/gif","base64",".gif",{flags:["image"]}); + $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/svg+xml","utf8",".svg",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("application/font-woff","base64",".woff"); diff --git a/core/modules/parsers/imageparser.js b/core/modules/parsers/imageparser.js index c0bcd65a9..0208d47e2 100644 --- a/core/modules/parsers/imageparser.js +++ b/core/modules/parsers/imageparser.js @@ -35,6 +35,9 @@ exports["image/jpg"] = ImageParser; exports["image/jpeg"] = ImageParser; exports["image/png"] = ImageParser; exports["image/gif"] = ImageParser; +exports["image/webp"] = ImageParser; +exports["image/heic"] = ImageParser; +exports["image/heif"] = ImageParser; exports["image/x-icon"] = ImageParser; })(); diff --git a/core/wiki/config/EditorTypeMappings.multids b/core/wiki/config/EditorTypeMappings.multids index f39a6e397..aa46e6fb8 100644 --- a/core/wiki/config/EditorTypeMappings.multids +++ b/core/wiki/config/EditorTypeMappings.multids @@ -1,6 +1,9 @@ title: $:/config/EditorTypeMappings/ image/gif: bitmap +image/webp: bitmap +image/heic: bitmap +image/heif: bitmap image/jpeg: bitmap image/jpg: bitmap image/png: bitmap