Image decode error as warning (#2471)

This commit is contained in:
ekzyis 2025-08-29 23:05:36 +02:00 committed by GitHub
parent 4ff3dfa412
commit 5898f09b34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -144,7 +144,7 @@ export const useMediaHelper = ({ src, srcSet: srcSetIntital, topLevel, tab }) =>
img.decode().then(() => { // decoding beforehand to prevent wrong image cropping
setIsImage(true)
}).catch((e) => {
console.error('Cannot decode image', e)
console.warn('Cannot decode image:', src, e)
})
}
video.src = src