Skip to content

Commit a0f88ed

Browse files
Hotfix: Prevent converting HEIC images until PR #350 is fixed
1 parent 957ca39 commit a0f88ed

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

public/scripts/util.js

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -477,13 +477,16 @@ function getThumbnailAsDataUrl(file, width = undefined, height = undefined, qual
477477
return new Promise(async (resolve, reject) => {
478478
try {
479479
if (file.type === "image/heif" || file.type === "image/heic") {
480-
// browsers can't show heic files --> convert to jpeg before creating thumbnail
481-
let blob = await fileToBlob(file);
482-
file = await heic2any({
483-
blob,
484-
toType: "image/jpeg",
485-
quality: quality
486-
});
480+
// hotfix: Converting heic images taken on iOS 18 crashes page. Waiting for PR #350
481+
reject(new Error(`Hotfix: Converting of HEIC/HEIF images currently disabled.`));
482+
return;
483+
// // browsers can't show heic files --> convert to jpeg before creating thumbnail
484+
// let blob = await fileToBlob(file);
485+
// file = await heic2any({
486+
// blob,
487+
// toType: "image/jpeg",
488+
// quality: quality
489+
// });
487490
}
488491

489492
let imageUrl = URL.createObjectURL(file);

0 commit comments

Comments
 (0)