I am getting an image from facebook by the URL: http://external.ak.fbcdn.net/safe_image.php?d=d282e1e7c86c9270232f97ddc737df39&w=90&h=90&url=http%3A%2F%2Fi52.tinypic.com%2F2q0ixzl.jpg
Now, I want a bigger version, like 200 by 200. Is there a URL for that? If not, how can I convert this image to a larger size?
Generally if you want to collect the profile pic of a user or page, the format for the icon size picture is:
and for the large picture:
EDIT Points to note: If the image stored on the facebook servers is less than the 200*200 dimensions, you would get the image as the highest resolution avaiable eg: 128*160. Either you can resize it using the GD library.
AND ONE MORE THING
Facebook supports 200*600px as the highest resolution for the profile pic. It will resize an image to fit into these dimensions by maintaining the aspect ratio.
*UPDATE as on 19th Feb, 2017 *
We need to use this new URL formation to get a desired profile image.
[Thank you https://stackoverflow.com/users/2829128/vay]
If you want to get a larger picture you can just set the height and width you want like this:
More info and examples here: Pictures - Facebook Developers
this will also work
picture.type(large)
example
}
YES, there is a way to get the original (most of time bigger) profile picture of a facebook page.
Actually the answer is already in the question. The original image url is already embedded in the save_image url. In your case it is "url=http%3A%2F%2Fi52.tinypic.com%2F2q0ixzl.jpg” which means "http://i52.tinypic.com/2q0ixzl.jpg"
In my case, the page for London is
I can easily get its fb object id by search keyword London. I have tried to use width and height parameter. They work with user profile picture or user shared picture but can’t work with public pages profile picture.
The largest picture I can get it by following url which is only 180x77
But I can get safe_image.php url by using fb graph api, and the original image url is also inside the parameters' url section
Here is code I used.
BUT, there are risks.
No guarantee the external image url will be validate.
Facebook may remove the explicit external url in the safe_image url or hide the safe_image url from developer in future.
Use it at your own risk.