ignore resist fingerprinting error when resizing image

TODO find another way
This commit is contained in:
john 2025-05-28 22:35:20 +02:00
parent ca2d377fc4
commit 6aeff51857

View file

@ -196,7 +196,15 @@ async function optimizeImageSize(
dstCanvas.width = width dstCanvas.width = width
dstCanvas.height = height dstCanvas.height = height
await pica.resize(srcCanvas, dstCanvas) try {
// TODO resistFingerprinting in FF and other causes this to break.
// knowing this, i would still rather be able to post from other browsers for now
// and will hopefully find a better solution
await pica.resize(srcCanvas, dstCanvas)
} catch (e) {
console.error('cant resize image', e)
return file
}
let blob = await pica.toBlob(dstCanvas, outputType, quality) let blob = await pica.toBlob(dstCanvas, outputType, quality)