Get profile picture from facebook, google, twitter and gravatar

An useful resource for developer that requires profile images from various social network website. In this article you will learn how to get profile picture URL from Facebook, Google, Twitter and Gravatar.

Get profile picture from facebook

Use following url to get facebook profile image. You have to replace <ID> with user id or uname of facebook user<ID>/picture?type=<small|normal|album|large|square>

Get Google+ profile picture URL

This method require google API key. To get google API key visit

After getting API key call following URL with user id and your API key<USER-ID>?fields=image&key=<YOUR_API_KEY>

In response you will get JSON object with profile picture URL

 "image": {
  "url": "",
  "isDefault": false

Get profile picture from twitter

Call following URL with your twitter screen_name<screen_name>/profile_image?size=<mini|normal|bigger|original>

Reference Twitter Developers Documentation

Get profile picture from gravatar

To get profile picture from gravatar first calculate md5 hash of user’s email ID then call following URL with that hash<md5 hash of email>?s=<size in pixels>

For example


Liked It? Get Free updates in your Email

Delivered by feedburner

5 thoughts on “Get profile picture from facebook, google, twitter and gravatar

  1. Rajkumar Soy

    How to get Large profile image with google+

  2. Vss

    How to get linkedin profile picture

    1. sanjay

      function getProfileData() {

  3. alejandro

    Could you please update the twitter one, since the new API this doesn’t work anymore, cheers

  4. Devang Srivastava

    Hello, I created a completely free API that can do this for you, Dev Identify. Some of it’s sources is Google, G+ and Gravatar. It provides name, location and profile picture data.


Leave a Reply

Your email address will not be published. Required fields are marked *