ignore resist fingerprinting error when resizing image
TODO find another way
This commit is contained in:
parent
ca2d377fc4
commit
6aeff51857
1 changed files with 9 additions and 1 deletions
|
@ -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)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue