mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-26 03:33:58 -05:00
Update to use bigger size of profile image
This commit is contained in:
parent
6405bb5056
commit
f3418a619c
1 changed files with 3 additions and 3 deletions
|
@ -61,7 +61,7 @@ module.exports = function (sequelize, DataTypes) {
|
||||||
var photo = null;
|
var photo = null;
|
||||||
switch (profile.provider) {
|
switch (profile.provider) {
|
||||||
case "facebook":
|
case "facebook":
|
||||||
photo = 'https://graph.facebook.com/' + profile.id + '/picture';
|
photo = 'https://graph.facebook.com/' + profile.id + '/picture?width=96';
|
||||||
break;
|
break;
|
||||||
case "twitter":
|
case "twitter":
|
||||||
photo = 'https://twitter.com/' + profile.username + '/profile_image?size=bigger';
|
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';
|
photo = 'https://avatars.githubusercontent.com/u/' + profile.id + '?s=96';
|
||||||
break;
|
break;
|
||||||
case "gitlab":
|
case "gitlab":
|
||||||
photo = profile.avatarUrl;
|
photo = profile.avatarUrl.replace(/(\?s=)\d*$/i, '$196');
|
||||||
break;
|
break;
|
||||||
case "dropbox":
|
case "dropbox":
|
||||||
//no image api provided, use gravatar
|
//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;
|
break;
|
||||||
case "google":
|
case "google":
|
||||||
photo = profile.photos[0].value.replace(/(\?sz=)\d*$/i, '$196');
|
photo = profile.photos[0].value.replace(/(\?sz=)\d*$/i, '$196');
|
||||||
|
|
Loading…
Reference in a new issue