title: Displaying a user picture in a Sharepoint web part
body: <p>I have this code in a webpart in sharepoint foundation and it display user information, but now i need to display a user picture and i don´t know how to do it....i´m quite new to programming
  Thanks in advance</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
  ExecuteOrDelayUntilScriptLoaded(init,'sp.js');
  var currentUser;
  function init(){
      this.clientContext = new SP.ClientContext.get_current();
      this.oWeb = clientContext.get_web();
      currentUser = this.oWeb.get_currentUser();
      this.clientContext.load(currentUser);
      this.clientContext.executeQueryAsync(Function.createDelegate(this,this.onQuerySucceeded), Function.createDelegate(this,this.onQueryFailed));
  }
  
  function onQuerySucceeded() {
      document.getElementById('userLoginName').innerHTML = currentUser.get_loginName(); 
      document.getElementById('userTitle').innerHTML = currentUser.get_title();
      document.getElementById('userEmail').innerHTML = currentUser.get_email();
  
  
      
  }
  
  function onQueryFailed(sender, args) {
      alert('Request failed. \nError: ' + args.get_message() + '\nStackTrace: ' + args.get_stackTrace());
  }
  &lt;/script&gt;
  
  &lt;div&gt;Current User: 
      &lt;span id="userLoginName"&gt;&lt;/span&gt;&lt;/br&gt;
  &lt;/div&gt;
  &lt;div&gt;Username:
      &lt;span id="userTitle"&gt;&lt;/span&gt;&lt;/br&gt;
  &lt;/div&gt;
  &lt;div&gt;Email:
      &lt;span id="userEmail"&gt;&lt;/span&gt;&lt;/br&gt;
  &lt;/div&gt;</code></pre>
  </div>
  </div>
  </p>