mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 07:55:46 +01:00
closes #6373
This commit is contained in:
@@ -20,6 +20,7 @@ image.resizeImage = function (data, callback) {
|
||||
extension: data.extension,
|
||||
width: data.width,
|
||||
height: data.height,
|
||||
quality: data.quality,
|
||||
}, function (err) {
|
||||
callback(err);
|
||||
});
|
||||
@@ -73,6 +74,12 @@ image.resizeImage = function (data, callback) {
|
||||
next(null, image);
|
||||
}
|
||||
},
|
||||
function (image, next) {
|
||||
if (data.quality) {
|
||||
image.quality(data.quality);
|
||||
}
|
||||
next(null, image);
|
||||
},
|
||||
function (image, next) {
|
||||
image.write(data.target || data.path, next);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user