1

I'm simply trying to display member photos, but cannot get my custom member group photos to display.

I am using the following code:

<span id="member-photo">
  <img src="{photo_url}" alt="{username}">
</span>

If I do this outside of a tag entry pair, I get the following code:

<span id="member-photo">
  <img src="{photo_url}" alt="adminname">
</span>

But if I put this inside of a channel entry I get the proper:

<span id="member-photo">
    <img alt="adminname" src="http://local.domain.com/uploads/member/photos/photo_1.png">
</span>

The problem is that when inside of the channel entry tag pair, it will show only the author of that entry's photo. How can I get this to show the logged in member's photo?

1 Answer 1

1

The reason the images were not displaying is because they needed to be wrapped in EE's custom profile data tag pairs. The following code is the fix:

{exp:member:custom_profile_data}
    <span id="member-photo">
            <img src="{photo_url}" alt="{username}">
    </span>
{/exp:member:custom_profile_data}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.