This might be a stupid question... but I can't seem to figure it out.
I'd like to show the photo of an author beside their entry. I thought the proper variable was...
{{user.photoUrl}}
...until I logged out and my photo disappeared.
This might be a stupid question... but I can't seem to figure it out.
I'd like to show the photo of an author beside their entry. I thought the proper variable was...
{{user.photoUrl}}
...until I logged out and my photo disappeared.
That will get you the url of the current user's photo. To get an author's photo do this:
{{ author.photoUrl }}
If the author is not defined in your context but the entry is, then get the entry's author's photo as follows:
{{ entry.author.photoUrl }}
In Craft 4, the following should be used:
{{ entry.author.photo.url ?? '' }}