mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 10:40:41 +01:00
basic webp support
This commit is contained in:
@@ -251,7 +251,7 @@ async function importEnex(importContext, file, parentNote) {
|
||||
noteContent = noteContent.replace(mediaRegex, resourceLink);
|
||||
};
|
||||
|
||||
if (["image/jpeg", "image/png", "image/gif"].includes(resource.mime)) {
|
||||
if (["image/jpeg", "image/png", "image/gif", "image/webp"].includes(resource.mime)) {
|
||||
try {
|
||||
const originalName = "image." + resource.mime.substr(6);
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ async function importSingleFile(importContext, file, parentNote) {
|
||||
return await importCodeNote(importContext, file, parentNote);
|
||||
}
|
||||
|
||||
if (["image/jpeg", "image/gif", "image/png"].includes(mime)) {
|
||||
if (["image/jpeg", "image/gif", "image/png", "image/webp"].includes(mime)) {
|
||||
return await importImage(file, parentNote, importContext);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user