Answers.Body: <p>You want to use the default blank user SVG from the Control Panel on the front-end of the site when there is no photo selected?</p>
  
  <p>If so, it's probably easiest just to copy it from <code>vendor/craftcms/cms/web/assets/cp/dist/images/user.svg</code> to a place in your public HTML folder and reference it there.</p>
  
  <p>Something like:</p>
  
  <pre><code>{% if entry.author.getPhoto() %}
      {{ entry.author.getPhoto().url }}
  {% else %}
      {{ url('path/to/user.svg') }}
  {% endif %}
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-12-03T01:18:35.863Z
Answers.LastActivityDate: 2018-12-03T01:18:35.863Z
Answers.UserDisplayName: Brad Bell
Body: <p>I'm calling user photo's from my template, but it error's out when trying to obviously call a user photo which is empty. What I'm trying to achieve is </p>
  
  <blockquote>
    <p><em>if there is no user photo, use the default placeholder image craft supplies</em></p>
  </blockquote>
  
  <p>The problem I'm having trouble getting to the bottom of is, how to access the default user photo?</p>
  
  <pre><code>    &lt;img class="img-fluid rounded-circle" src="{{ entry.author.getPhoto().url }}" width="100" height="100" alt="{{ entry.author }} Picture"&gt;
  </code></pre>
  
  <p>Any help would be great</p>
  
Tags: <templating><users>
Title: Access Default User Photo
ThreadText: # Access Default User Photo
  
  (Asked by: username_0 on 2018-12-02)
  
  I'm calling user photo's from my template, but it error's out when trying to obviously call a user photo which is empty. What I'm trying to achieve is
  
  > *if there is no user photo, use the default placeholder image craft supplies*
  
  The problem I'm having trouble getting to the bottom of is, how to access the default user photo?
  
  ```
      <img class="img-fluid rounded-circle" src="{{ entry.author.getPhoto().url }}" width="100" height="100" alt="{{ entry.author }} Picture">
  
  ```
  
  Any help would be great
  
  **Tags:** templating, users
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2018-12-03. Score: 1 | Accepted answer
  
  You want to use the default blank user SVG from the Control Panel on the front-end of the site when there is no photo selected?
  
  If so, it's probably easiest just to copy it from `vendor/craftcms/cms/web/assets/cp/dist/images/user.svg` to a place in your public HTML folder and reference it there.
  
  Something like:
  
  ```
  {% if entry.author.getPhoto() %}
      {{ entry.author.getPhoto().url }}
  {% else %}
      {{ url('path/to/user.svg') }}
  {% endif %}
  
  ```
  
  
  ---
  
  