You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am using next js and try to compress image at api route( backend) and i am getting this error. error Error [TypeError]: Cannot read properties of undefined (reading 'engine')
i am using next js and try to compress image at api route( backend) and i am getting this error. error Error [TypeError]: Cannot read properties of undefined (reading 'engine')
my code :
let output_path=path.join(process.cwd(),"public","media","country","less","10mb.jpg")
let input_path=path.join(process.cwd(),"public","media","country","10mb.jpg")
compress_images(input_path, output_path, { compress_force: false, statistic: true, autoupdate: true }, false,
{ jpg: { engine: "mozjpeg", command: ["-quality", "60"] } },
function (error, completed, statistic) {
console.log("-------------");
console.log(error);
console.log(completed);
console.log(statistic);
console.log("-------------");
}
);
The text was updated successfully, but these errors were encountered: