Forum

Thread tagged as: Question, Suggestions, Members

Upload Profile Image to Members App

Hi Drew, After reading through the forums, it appears that it is not possible with the Members App to allow a member to upload a profile image? Is that correct? However, I noticed some of these forum posts were older and wondering if it has now become possible. If not, do you know of anyone or a custom resource that has accomplished this on the backend. I'm not looking for members to be able to see each other's profile, just to simply personalize their own dashboard with an image of them.

Greg Stone

Greg Stone 0 points

  • 5 years ago

Oh, and if this is not possible, can a user include their own universal gravatar instead, similar to blog app comments?

Drew McLellan

Drew McLellan 2638 points
Perch Support

All you need for a gravatar is the email address, which you have. Use hash="md5" to get the MD5.

The Members app itself doesn't currently handle file uploads.

Great. Currently this is my code. How would I implement the hash="md5" here?

echo 
           ' <img src="//www.gravatar.com/avatar/'.perch_member_get('email').'"/>' ;

Drew McLellan

Drew McLellan 2638 points
Perch Support

You wouldn't need to there, just use the md5() function.

echo ' <img src="//www.gravatar.com/avatar/'.md5(perch_member_get('email')).'"/>' ;

Thanks Drew! Works perfectly!