Display Current Login User Profile Picture In Lightning Component

Lightning Component

Hi guys, today in this post we are going to learn how we can show current login user profile image dynamically in salesforce lightning component. this component can be useful for lightning communities where we need to display custom current login user profile picture.

login-user-profile-picture-lightning

Apex Controller  : loginUserProfileCtrl.apxc

Lightning Component : loginUserPicture.cmp

JavaScript Controller : loginUserPictureController.js

Lightning Application [output.app]

Lightning Component Output :

login

Happy Learning 

Like our facebook page for new post updates.? & Don’t forget to bookmark this site for your future reference.

Check Out Also : Formula Fields to Display Images From Files/Content Documents – Salesforce Lightning/Classic

(Visited 4,821 times, 1 visits today)

One thought on “Display Current Login User Profile Picture In Lightning Component

  • Thanks for your great post! But I am not able to save the controller and getting this below issue :

    Failed to save CL_loginUserPicture.cmp: Invalid definition for null:loginUserProfileCtrl: Select id,Name,SmallPhotoUrl, FullPhotoUrl from ^ ERROR at Row:1:Column:16 No such column ‘SmallPhotoUrl’ on entity ‘User’. If you are attempting to use a custom field, be sure to append the ‘__c’ after the custom field name. Please reference your WSDL or the describe call for the appropriate names.: Source

    Can you please let me know what is the issue here ?

    Thanks again

Leave a Reply