dont fail on errors, some images fail otherwise
This commit is contained in:
parent
6313ad257f
commit
0cbc8e69a3
2 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ images.forEach(async (image) => {
|
|||
const iamgeOutPath = `${dir}/r/${image}`
|
||||
const orientation = await getExifOrientation(imagePath)
|
||||
|
||||
let sharpImg = sharp(imagePath)
|
||||
let sharpImg = sharp(imagePath, { failOnError: false })
|
||||
// when image is rotated to the left or right, switch width/height
|
||||
// https://jdhao.github.io/2019/07/31/image_rotation_exif_info/
|
||||
if (orientation === 6) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue