function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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.

https://salesforce.stackexchange.com/questions/368233/upload-picture-using-lwc-lightning-web-components-problem-to-get-result
https://salesforcescool.blogspot.com/2021/12/upload-and-preview-image-in-lightning.html

Please mark as Best Answer if above information was helpful.

Thanks,
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 .