How to resize image on fly(express and S3)
问题 I am tring to get image from url and then to resize on fly without saving var request = require('request'); request .get('s3url') .on('response', function (response) { console.log(response) // 200 console.log(response.headers['content-type']) // 'image/png' }) .pipe(res) I can now return same picture with request lib but how can I manipulate it and then return as response? 回答1: There are several npm modules that do resizing one example is sharp. You can use it in this way (example taken from