3

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!

Kara
  • 6,115
  • 16
  • 50
  • 57
dough
  • 714
  • 5
  • 14

1 Answers1

1

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.

class
  • 8,621
  • 29
  • 30
  • I'm using the old contacts api https://developers.google.com/google-apps/contacts/v3/ not the new Google+ API so when I get an image it looks like: https://www.google.com/m8/feeds/photos/media/me@email.com/4ae480cc818e8 I don't see any way to get a user's contacts via the new google+ API. So I think I'm stuck. Is there any way to set the High Res images using the old API? – dough Dec 20 '12 at 18:51
  • 1
    Exactly what i needed. Thanks ! – Sanket Berde Jun 03 '15 at 07:11