+ Start a Discussion
User SethUser Seth 

How to create a picture upload LWC component

I want to create a lwc component similar to the standard one that is in USER DETAIL 

User-added image
So this will display picture of LoggedIn User also they can update/Change  the Photo Exactly similar to standard one.

Is it possible with LWC component
VinayVinay (Salesforce Developers) 
Hi Seth,

Check below examples that can help you to upload picture in LWC.


Please mark as Best Answer if above information was helpful.

Kornet MaklaiKornet Maklai
When you upoad an image with lightning-file-upload in handleUploadFinished method you have event.detail.files property.
Each of this files contains contentVersionId for appropriate file.
So you can use this contentVersionId for showing image .