diff options
author | Cheng-Han, Wu | 2016-05-21 22:48:21 +0800 |
---|---|---|
committer | Cheng-Han, Wu | 2016-05-21 22:48:21 +0800 |
commit | f3418a619ca672d52136e8ddd0846ea56a876904 (patch) | |
tree | 824cf2c36ced3576d6dbfdc01c00e181d7fcf837 /lib/models | |
parent | 6405bb505695a5592efe8aa8d5bde9e723fadfc0 (diff) |
Update to use bigger size of profile image
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/user.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/models/user.js b/lib/models/user.js index 3142a53d..7272f688 100644 --- a/lib/models/user.js +++ b/lib/models/user.js @@ -61,7 +61,7 @@ module.exports = function (sequelize, DataTypes) { var photo = null; switch (profile.provider) { case "facebook": - photo = 'https://graph.facebook.com/' + profile.id + '/picture'; + photo = 'https://graph.facebook.com/' + profile.id + '/picture?width=96'; break; case "twitter": photo = 'https://twitter.com/' + profile.username + '/profile_image?size=bigger'; @@ -70,11 +70,11 @@ module.exports = function (sequelize, DataTypes) { photo = 'https://avatars.githubusercontent.com/u/' + profile.id + '?s=96'; break; case "gitlab": - photo = profile.avatarUrl; + photo = profile.avatarUrl.replace(/(\?s=)\d*$/i, '$196'); break; case "dropbox": //no image api provided, use gravatar - photo = 'https://www.gravatar.com/avatar/' + md5(profile.emails[0].value); + photo = 'https://www.gravatar.com/avatar/' + md5(profile.emails[0].value) + '?s=96'; break; case "google": photo = profile.photos[0].value.replace(/(\?sz=)\d*$/i, '$196'); |