+ Start a Discussion

Uploading chatter profile photo from visualforce page

Hi All,

We are having out of the box feature to upload chatter profile picture.
I am having a requirement, where the user will be allowed to upload the profile pic using visualforce page.

But dont know how to proceed.
Could you guys help me with this?


I have not tried it out so i do not have sample code but this is possible by using setPhoto method of chatterUsers class. This method sets the user photo to be the specified, already uploaded file.

Refer: https://www.salesforce.com/us/developer/docs/apexcode/Content/apex_ConnectAPI_ChatterUsers_static_methods.htm
Thanks Vinita for ur prompt response.

Will check this and let you know.

Hi ,
Can you please post some code for the above question.How you did it or any idea how to achieve it?
Marty C.Marty C.
Hello, everyone, here's a link to a similar question (https://developer.salesforce.com/forums/?id=906F0000000AX3nIAG) from Arabinda, where I've shared a possible answer, using a ConnectApi.ChatterUsers method to update a user's profile photo.
Greg CookGreg Cook
I tried Marty's solution and it works great.