Normally, there are 2 ways render the user profile picture programmatically in Drupal 7. But before i show you the code, i would like to introduce the profile picture setting @ admin/config/people/accounts/settings.

In the above setting page, you can define the profile picture size by selecting a proper Picture display style. In my case, the default image style is user-avatar.
Ok, let’s move back to today’s topic.
The following code will render the user profile picture with the image style set in the Picture display style under the Account settings page.
$user = user_load($uid);
print theme('user_picture', array('account' => $user));
Very straight forward, isn’t it? But how about if i want to have another image style other than the default one? Here you are. =)
$user = user_load($uid);
print theme('image_style', array('path' => $user->picture->uri, 'style_name' => '<image-style>'));
Done =)
Reference: StackOverflow – How to dispaly user avatar in Drupal 7?

oh my god. 7 hours on this and finally i got it. thank you. mine looks like:
$user->picture->uri, ‘style_name’ => ‘thumbnail’)); ?>
LikeLike
Good to know that you have solved your problem. but your code could not be shown probably. Could you post it again as stated in the Syntax Highlight? thanks.
LikeLike