dough
dough

Reputation: 734

Does Google Contacts API Support High Resolution Pictures?

Google recently added high resolution support (720x720) for contacts' images via the gmail interface. Previously, it would to convert all images to 96x96. However, when I post an image using the Contacts API it still gets converted to 96x96. I currently use the picture url in the link ref http://schemas.google.com/contacts/2008/rel#photo. Is there a way to post higher resolution images or are we still stuck at 96x96 if we use the Contacts API? Is there another programmatic way to accomplish this?

Thanks!

Upvotes: 3

Views: 1640

Answers (1)

class
class

Reputation: 8681

I'm assuming that you are using the Google+ API to retrieve their profile and are looking at the profile image, as seen here using the API explorer:

https://developers.google.com/apis-explorer/#search/profile/m/plus/v1/plus.people.get?userId=107345380056943591322&_h=1&

In the response is an image URL:

 "image": {
  "url": "https://lh3.googleusercontent.com/-2N7UIsa-tLI/AAAAAAAAAAI/AAAAAAAAAK8/XJiZoMReZr0/photo.jpg?sz=50"
 },

You can alter the sz parameter to indicate the width/height of the rendered image, for example:

https://lh3.googleusercontent.com/-2N7UIsa-tLI/AAAAAAAAAAI/AAAAAAAAAK8/XJiZoMReZr0/photo.jpg?sz=500

There are other url formats, it's not clear which url you are getting but if you paste an example, I'd be happy to help.

Upvotes: 1

Related Questions