<pre><code>{{ entry.getAuthor().getPhoto().getUrl() }}
</code></pre>

<p>Here is the <a href="https://github.com/craftcms/cms/blob/master/src/elements/User.php#L1180" rel="nofollow noreferrer">function</a>. Of course if the author has no photo you'll receive nothing (but an exception). Furthermore this function returns the URL not a HTML tag. </p>

CC BY-SA 3.0
2018-04-25T23:33:55.953Z
Thanks Robin! I tried that and still get nothing, even though the profile pic of the author is present. hmmmm
Vin
CC BY-SA 3.0
2018-04-25T23:35:25.140Z
What does `entry.getAuthor.photoId` or `entry.getAuthor().getPhoto().id` output?
Robin Schambach
CC BY-SA 3.0
2018-04-25T23:43:50.023Z
That returns 279
Vin
CC BY-SA 3.0
2018-04-25T23:49:31.200Z
Seems like an invalid configuration. You can dump the volume in order to see the url setting. `{{ dump(entry.getAuthor().getPhoto().getVolume()) }}` there must be an attribute `url`/ `hasUrls` if it's empty you have to change the settings in the corresponding volume in your cp
Robin Schambach
CC BY-SA 3.0
2018-04-26T00:28:14.293Z
Thanks again Robin :) . That was it, the config in assets had @storage/userPhotos. Once I changed File System Path to @webroot/images/blogs/userPhotos and made it accessible to public, it worked!
Vin
CC BY-SA 3.0
2018-04-25T23:17:57.910Z
2018-04-28T18:45:17.457Z
2018-04-28T18:45:17.457Z
Robin Schambach
<p>Trying to display the author photo of the entry (it's there for sure).  The Craft 2 way I used <strong>entry.author.photoUrl</strong> but that is not working so I tried <strong>entry.author.photo.url</strong> and that does not show anything and no error or warnings.</p>

<p>Is what I am doing correct?</p>

<craft3>
Craft 3 Author Photo
# Craft 3 Author Photo

(Asked by: username_0 on 2018-04-25)

Trying to display the author photo of the entry (it's there for sure). The Craft 2 way I used **entry.author.photoUrl** but that is not working so I tried **entry.author.photo.url** and that does not show anything and no error or warnings.

Is what I am doing correct?

**Tags:** craft3

---

## 1 answers

### Answer by username_1 on 2018-04-25. Score: 6 | Accepted answer

{{ entry.getAuthor().getPhoto().getUrl() }}

Here is the function. Of course if the author has no photo you'll receive nothing (but an exception). Furthermore this function returns the URL not a HTML tag.

> **Comments:**
> **username_0**: Thanks Robin! I tried that and still get nothing, even though the profile pic of the author is present. hmmmm  
> **username_1**: What does `entry.getAuthor.photoId` or `entry.getAuthor().getPhoto().id` output?  
> **username_0**: That returns 279  
> **username_1**: Seems like an invalid configuration. You can dump the volume in order to see the url setting. `{{ dump(entry.getAuthor().getPhoto().getVolume()) }}` there must be an attribute `url`/ `hasUrls` if it's empty you have to change the settings in the corresponding volume in your cp  
> **username_0**: Thanks again Robin :) . That was it, the config in assets had @storage/userPhotos. Once I changed File System Path to @webroot/images/blogs/userPhotos and made it accessible to public, it worked!  

---

