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.
Craft CMS Stack Exchange is a question and answer site for administrators, end users, developers and designers for Craft CMS. It only takes a minute to sign up.
Sign up to join this communityThis 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 }}