Answers.Body: <p>Just posting so that anyone having a similar question can benefit.</p>
  <p>You can login to Civicirm and uder the Support Developer Menu Item look at Developer &gt; API. Here you can generate your API code including any of the feilds you require. Following is the full PHP code I used to call the profile Display Name, Photograph, Job Title &amp; Phone. Perhaps it is not the most optimized code but it works.. The last Print statements needs to be wrapped withing html tags for formatting. 2nd one is the image path so needs to wrapped within in a image tags src (can not post with html tags here)</p>
  <pre>
  (PHP starts)
  defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );
  $user = JFactory::getUser();
  require_once JPATH_ROOT . '/administrator/components/com_civicrm/helpers/api.php'; 
  CivicrmHelperApi::civiimport('api');
  
  $email = $user->email;
  
  $details = civicrm_api3('Contact', 'getsingle', [
    'return' => ["display_name", "image_URL", "job_title", "phone"],
    'email' => $email,
  ]);
  $profile = array();
  $x=0;
  foreach ($details as $key => $value) {
      $profile[$x]= "$value";
      $x=$x+1;
  }
  if ($profile[2]=="") {
      $profile[2]= "/templates/common/images/member-dash-default-photo.jpg";
  }
  
  
  print_r( $profile[1])
  echo $profile[2]
  print_r( $profile[3])
  print_r( $profile[7])
  print_r( $profile[9])
  (PHP ends)
  </pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-15T08:43:51.983Z
Answers.LastActivityDate: 2020-11-15T08:43:51.983Z
Answers.UserDisplayName: Srinath Obeysekara
Answers.Body: <p>You can use an API to get the image URL for a contact. For eg -</p>
  
  <pre><code>$result = civicrm_api3('Contact', 'getsingle', [
    'return' =&gt; ["image_URL"],
    'id' =&gt; contact_id,
  ]);
  </code></pre>
  
  <p>And then copy the value returned by the above API and fed it to the source of image tag in simple HTML code:-</p>
  
  <pre><code>&lt;p&gt;
    ......
    ......
  
    &lt;img src = "$result['image_URL']" /&gt;
  &lt;/p&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-13T11:02:38.003Z
Answers.Text: Hi Jitendra. Sorry for the late response. Thanks very much for your help. I will try this! - Sri
Answers.UserDisplayName: sri
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-18T11:18:59.803Z
Answers.LastActivityDate: 2018-12-18T11:18:59.803Z
Answers.UserDisplayName: jitendra - fuzion
Body: <p>How can I show the Users Profile Picture on a Civicrm Form please (in joomla)?</p>
  
  <p>Thanks a lot,
  Sri</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-17T19:21:58.857Z
Comments.Text: Hi Sri welcome to Civicrm Stackexchange what kind of form? Do you mean a contribution page/event page or a "profile" form.
Comments.UserDisplayName: Luke Stewart
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-12-18T05:15:53.743Z
Comments.Text: Hi Luke, a profile form or a code snippet that I can use to display the profile picture on a joomla article please. - Sri
Comments.UserDisplayName: sri
Tags: <joomla>
Title: Profile Picture on CIvicrm Form
ThreadText: # Profile Picture on CIvicrm Form
  
  (Asked by: username_0 on 2018-12-17)
  
  How can I show the Users Profile Picture on a Civicrm Form please (in joomla)?
  
  Thanks a lot,
  Sri
  
  **Tags:** joomla
  
  > **Comments:**
  > **username_1**: Hi Sri welcome to Civicrm Stackexchange what kind of form? Do you mean a contribution page/event page or a "profile" form.  
  > **username_0**: Hi Luke, a profile form or a code snippet that I can use to display the profile picture on a joomla article please. - Sri  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2020-11-15. Score: 2
  
  Just posting so that anyone having a similar question can benefit.
  You can login to Civicirm and uder the Support Developer Menu Item look at Developer > API. Here you can generate your API code including any of the feilds you require. Following is the full PHP code I used to call the profile Display Name, Photograph, Job Title & Phone. Perhaps it is not the most optimized code but it works.. The last Print statements needs to be wrapped withing html tags for formatting. 2nd one is the image path so needs to wrapped within in a image tags src (can not post with html tags here)
  
  (PHP starts)
  defined('_JEXEC') OR defined('_VALID_MOS') OR die( "Direct Access Is Not Allowed" );
  $user = JFactory::getUser();
  require_once JPATH_ROOT . '/administrator/components/com_civicrm/helpers/api.php'; 
  CivicrmHelperApi::civiimport('api');
  
  $email = $user->email;
  
  $details = civicrm_api3('Contact', 'getsingle', [
    'return' => ["display_name", "image_URL", "job_title", "phone"],
    'email' => $email,
  ]);
  $profile = array();
  $x=0;
  foreach ($details as $key => $value) {
      $profile[$x]= "$value";
      $x=$x+1;
  }
  if ($profile[2]=="") {
      $profile[2]= "/templates/common/images/member-dash-default-photo.jpg";
  }
  
  
  print_r( $profile[1])
  echo $profile[2]
  print_r( $profile[3])
  print_r( $profile[7])
  print_r( $profile[9])
  (PHP ends)
  
  
  ---
  
  ### Answer by username_3 on 2018-12-18. Score: 2
  
  You can use an API to get the image URL for a contact. For eg -
  $result = civicrm_api3('Contact', 'getsingle', [
    'return' => ["image_URL"],
    'id' => contact_id,
  ]);
  
  And then copy the value returned by the above API and fed it to the source of image tag in simple HTML code:-
  
    ......
    ......
  
  > **Comments:**
  > **username_0**: Hi Jitendra. Sorry for the late response. Thanks very much for your help. I will try this! - Sri  
  
  ---
  
  