mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-03 04:25:55 +01:00
closes #1974
This commit is contained in:
@@ -63,6 +63,10 @@
|
|||||||
"field": "maximumProfileImageSize",
|
"field": "maximumProfileImageSize",
|
||||||
"value": 256
|
"value": 256
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"field": "profileImageDimension",
|
||||||
|
"value": 128
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"field": "chatMessagesToDisplay",
|
"field": "chatMessagesToDisplay",
|
||||||
"value": 50
|
"value": 50
|
||||||
|
|||||||
@@ -398,10 +398,11 @@ accountsController.uploadPicture = function (req, res, next) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var updateUid = req.user.uid;
|
var updateUid = req.user.uid;
|
||||||
|
var imageDimension = parseInt(meta.config.profileImageDimension, 10) || 128;
|
||||||
|
|
||||||
async.waterfall([
|
async.waterfall([
|
||||||
function(next) {
|
function(next) {
|
||||||
image.resizeImage(req.files.userPhoto.path, extension, 128, 128, next);
|
image.resizeImage(req.files.userPhoto.path, extension, imageDimension, imageDimension, next);
|
||||||
},
|
},
|
||||||
function(next) {
|
function(next) {
|
||||||
if (parseInt(meta.config['profile:convertProfileImageToPNG'], 10) === 1) {
|
if (parseInt(meta.config['profile:convertProfileImageToPNG'], 10) === 1) {
|
||||||
|
|||||||
@@ -279,7 +279,7 @@ var
|
|||||||
}
|
}
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
size: '128',
|
size: parseInt(meta.config.profileImageDimension, 10) || 128,
|
||||||
default: customGravatarDefaultImage || meta.config.defaultGravatarImage || 'identicon',
|
default: customGravatarDefaultImage || meta.config.defaultGravatarImage || 'identicon',
|
||||||
rating: 'pg'
|
rating: 'pg'
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user