Skip to content

Node.js based forum software built for the modern web

closes #1974

barisusakli5c84a3adb500
diff --git a/install/data/defaults.json b/install/data/defaults.json
index fc5369de82..0ecd7b5fd1 100644
--- a/install/data/defaults.json
+++ b/install/data/defaults.json
@@ -63,6 +63,10 @@
"field": "maximumProfileImageSize",
"value": 256
},
+ {
+ "field": "profileImageDimension",
+ "value": 128
+ },
{
"field": "chatMessagesToDisplay",
"value": 50
diff --git a/src/controllers/accounts.js b/src/controllers/accounts.js
index f2be462147..15bfd0a17b 100644
--- a/src/controllers/accounts.js
+++ b/src/controllers/accounts.js
@@ -398,10 +398,11 @@ accountsController.uploadPicture = function (req, res, next) {
}
var updateUid = req.user.uid;
+ var imageDimension = parseInt(meta.config.profileImageDimension, 10) || 128;
async.waterfall([
function(next) {
- image.resizeImage(req.files.userPhoto.path, extension, 128, 128, next);
+ image.resizeImage(req.files.userPhoto.path, extension, imageDimension, imageDimension, next);
},
function(next) {
if (parseInt(meta.config['profile:convertProfileImageToPNG'], 10) === 1) {
diff --git a/src/user.js b/src/user.js
index 6cd1589a45..0919406089 100644
--- a/src/user.js
+++ b/src/user.js
@@ -279,7 +279,7 @@ var
}
var options = {
- size: '128',
+ size: parseInt(meta.config.profileImageDimension, 10) || 128,
default: customGravatarDefaultImage || meta.config.defaultGravatarImage || 'identicon',
rating: 'pg'
};