How to display programmaticaly default user picture? I want to display programmatically default user picture if the user is not uploaded any. For that I have written code php code but its displaying user uploaded user picture correctly but not the one default when user doesn't upload his/her own. How to do that? help me.

$user = user_load($user-&gt;uid);
$account = user_load($user-&gt;uid);
print theme(
    'image_style',
    array( 'account' =&gt;$user,
      'style_name' =&gt; 'x-small', 
     // 'path' =&gt;!empty($user-&gt;picture-&gt;uri)?$user-&gt;picture-&gt;uri:variable_get('user_picture_default'),
      'path' =&gt;!empty($user-&gt;picture-&gt;uri)?$user-&gt;picture-&gt;uri:variable_get('user_picture_default',''),
      'attributes' =&gt; array(
        'class' =&gt; 'avatar' 
      )
    )
  );
Its very straight forward. If you want to add a default picture then go ahead and add the picture from the admin page as the other answer suggested. Programmatically, 
The default picture is loaded via the variable user_picture_default. 
So you can do,

$user = user_load($uid);
print theme('image_style', array('path' =&gt; $user-&gt;picture-&gt;uri, 'style_name' =&gt; '&lt;image-style&gt;'));

if (!empty($user-&gt;picture)) {
  print theme('image_style', array('path' =&gt; $user-&gt;picture-&gt;uri, 'style_name' =&gt; 'CUSTOM_STYLE'));
}
else {
  $custom_default_image_path = 'public://default_image.png';
  print theme('image_style', array('path' =&gt; variable_get('user_picture_default', $custom_default_image_path), 'style_name' =&gt; 'CUSTOM_STYLE'));
}


However, you can also make the default image theme dependent/independent via the hook