0

I am using and it working fine, Problem is that it down scales the image to 96 X 96. If i upload same image from google dashboard, it makes the image crop then saves in good quality.

service.users.photos.update(
      {
        userKey: req.user.email,
        auth: jwtClient,
        requestBody: {
          photoData: newfile,
          width: '800',
          height: '800',
          kind: 'admin#directory#user#photo'
        }
      },
      (err, response) => {
        console.log(err);
        console.log(response);
      }
    );

1 Answers1

0

Answer:

This is working as intended.

More Information:

According to the Directory API documentation for Users.photos: update:

Whatever the size of the photo being uploaded, the API downsizes it to 96x96 pixels.

So this is as expected.

References:

Rafa Guillermo
  • 14,474
  • 3
  • 18
  • 54