title: Make the google profile image larger size from Google Oauth using passport
body: <p>I am trying to get the full size image from google using passport Google Oauth. </p>
  
  <p>I see from other questions that the small size is coming from the "/photo.jpg?sz=50'" at the end of the url string.</p>
  
  <p>since i don't think there is a way to ask for the full size on initial load, what would be the way to remove that part of the url before it gets saved to the database.</p>
  
  <p>One person said to put:</p>
  
  <pre><code> iamgeUrl=user[image][url].substr(0,user[image][url].indexOf('?str=')) + '?sz=100';
  </code></pre>
  
  <p>but not sure where that would go in my code...</p>
  
  <pre><code>    passport.use(
    new GoogleStrategy(
      {
        // options for google strategy
        clientID: process.env.googleclientID,
        clientSecret: process.env.googleclientSecret,
        callbackURL: "/auth/google/redirect"
      },
      (accessToken, refreshToken, profile, done) =&gt; {
        console.log(accessToken, refreshToken, profile)
        // check if user already exists in our own db
        User.findOne({ googleId: profile.id }).then(currentUser =&gt; {
          if (currentUser) {
            // already have this user
            done(null, currentUser);
          } else {
            // if not, create user in our db
            new User({
                googleId: profile.id,
                username: profile.displayName,
                thumbnail: profile._json.image.url,
                firstName: profile.name.givenName,
                lastName: profile.name.familyName,
                email: profile.emails[0].value,
  
  
  
            })
              .save()
              .then(user =&gt; {
  
                console.log("created new user: ", user);
                done(null, user);
              });
          }
        });
      }
    )
  );
  </code></pre>