File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ( / ( \? s z = ) \d * $ / i, '$196' ) ;
You can’t perform that action at this time.
0 commit comments