import sharp from "sharp"; const p = "../vilmax-d2c-demo/public/products/oskar/oskar-left-side.jpg"; const m = await sharp(p).metadata(); console.log(m.width, m.height); await sharp(p).extract({ left: 0, top: Math.floor((m.height??0)*0.5), width: Math.floor((m.width??0)*0.5), height: Math.floor((m.height??0)*0.5) }).png().toFile("tmp/oldside.png"); console.log("ok");