let Jimp = await npm('jimp')
let width = await arg('New width in pixels')
let selectedFiles = await getSelectedFile();
let filePaths = selectedFiles.split("\n");
for (let filePath of filePaths) {
Jimp.read(filePath, (err, image) => {
if (err) throw err;
image.resize(parseInt(width), Jimp.AUTO).write(filePath);
});
}