From a0f88ed4923ee56e9119183cf42c7bd0c871d45a Mon Sep 17 00:00:00 2001 From: schlagmichdoch Date: Tue, 11 Feb 2025 11:10:01 +0100 Subject: [PATCH] Hotfix: Prevent converting HEIC images until PR #350 is fixed --- public/scripts/util.js | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/public/scripts/util.js b/public/scripts/util.js index fc418ff..7d6c54a 100644 --- a/public/scripts/util.js +++ b/public/scripts/util.js @@ -477,13 +477,16 @@ function getThumbnailAsDataUrl(file, width = undefined, height = undefined, qual return new Promise(async (resolve, reject) => { try { if (file.type === "image/heif" || file.type === "image/heic") { - // browsers can't show heic files --> convert to jpeg before creating thumbnail - let blob = await fileToBlob(file); - file = await heic2any({ - blob, - toType: "image/jpeg", - quality: quality - }); + // hotfix: Converting heic images taken on iOS 18 crashes page. Waiting for PR #350 + reject(new Error(`Hotfix: Converting of HEIC/HEIF images currently disabled.`)); + return; + // // browsers can't show heic files --> convert to jpeg before creating thumbnail + // let blob = await fileToBlob(file); + // file = await heic2any({ + // blob, + // toType: "image/jpeg", + // quality: quality + // }); } let imageUrl = URL.createObjectURL(file);