With the introduction of Timeline users have larger profile images, but Facebook still restrict the “square” image to 50px by 50px. Here is a clever way of generating a new thumbnail image for the user (on the fly) using the Facebook Graph API and the PHP GD2 library (image manipulation).
The below code gets the image for a given ID from Facebook, and crops the image to what Facebook uses on the Timeline profile. The result is a square image in various dimensions. Some users will have a large square image (155px), while others might have a smaller one (75px).
You can call this script by pasting the code into a file (e.g. crop.php) and then navigating to: crop.php?id=60506094
. Replace my Facebook ID with whatever you want to see the result.
i thought it is not possible to get bigger fb square icon than 50/50… you made my day! thank you very much for this post!!!
I don’t get how I can navigate to crop.php?id=60506094? Do I open the php file in Firefox? Change the id parameters in the code to the required id?
But thanks for the effort in providing this great method :D.
You need to upload the file to your server and then navigate to it via your site URL. Changing the ID in the URL will let to access a users profile image.