Skip to content

Commit f3418a6

Browse files
committed
Update to use bigger size of profile image
1 parent 6405bb5 commit f3418a6

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

lib/models/user.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ module.exports = function (sequelize, DataTypes) {
6161
var photo = null;
6262
switch (profile.provider) {
6363
case "facebook":
64-
photo = 'https://graph.facebook.com/' + profile.id + '/picture';
64+
photo = 'https://graph.facebook.com/' + profile.id + '/picture?width=96';
6565
break;
6666
case "twitter":
6767
photo = 'https://twitter.com/' + profile.username + '/profile_image?size=bigger';
@@ -70,11 +70,11 @@ module.exports = function (sequelize, DataTypes) {
7070
photo = 'https://avatars.githubusercontent.com/u/' + profile.id + '?s=96';
7171
break;
7272
case "gitlab":
73-
photo = profile.avatarUrl;
73+
photo = profile.avatarUrl.replace(/(\?s=)\d*$/i, '$196');
7474
break;
7575
case "dropbox":
7676
//no image api provided, use gravatar
77-
photo = 'https://www.gravatar.com/avatar/' + md5(profile.emails[0].value);
77+
photo = 'https://www.gravatar.com/avatar/' + md5(profile.emails[0].value) + '?s=96';
7878
break;
7979
case "google":
8080
photo = profile.photos[0].value.replace(/(\?sz=)\d*$/i, '$196');

0 commit comments

Comments
 (0)