Message from JavaScript discussions

April 2019

— How can i reduce the size (as 2MB to 200KB) of an image using node/js


.resize(200, 200)
.toFile('ouput.jpg', function(err) {
// output.jpg is a 200 pixels wide and 200 pixels high image
// containing a scaled and cropped version of input.jpg

— Use sharp with nodejs for that

— Install using this- npm install sharp in machine

— Thanks Yo

— For js and all its frameworks I prefer vscode

— Brackets is also good

— Vscode

— ?

— May be but I have been using vscode for long time and was really comfortable with it

— Ikr

— Thanks man