[Facebook] Getting Profile Image URLs in Various Sizes

Tadashi Shigeoka ·  Sat, January 21, 2012

I’ve summarized how to get profile picture URLs on Facebook.

First, the basic URL to get a profile image.

http://graph.facebook.com/userID/picture

As shown below, you can also specify the image size.

http://graph.facebook.com/userID/picture?type=large

There are 4 values that can be specified for the type parameter.

・square (50x50)

・small (50 pixels wide, variable height)

・normal (100 pixels wide, variable height)

・large (about 200 pixels wide, variable height)

Also, by adding the parameter return_ssl_resources=1, you can get the image URL with SSL.

http://graph.facebook.com/userID/picture?return_ssl_resources=1

Simply starting with https:// seems to work too.

https://graph.facebook.com/userID/picture

Below is the information source (Facebook official).

You can specify the picture size you want with the type argument, which should be one of square (50x50), small (50 pixels wide, variable height), normal (100 pixels wide, variable height), and large (about 200 pixels wide, variable height):

http://graph.facebook.com/your_username/picture?type=large

If you need a picture to be returned over a secure connection, you can set the return_ssl_resources argument to 1:

http://graph.facebook.com/your_username/picture?return_ssl_resources=1

・Source: Graph API - Facebook Developers

That’s all from the Gemba.