Hotfix: Prevent converting HEIC images until PR #350 is fixed

This commit is contained in:
schlagmichdoch 2025-02-11 11:10:01 +01:00
parent 957ca39f90
commit a0f88ed492

View file

@ -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);