Avatars/User Images in Kentico 12?

Emily Hughes asked on July 31, 2019 22:42

I need to store a profile image for each user and display it on the front end of a Kentico site. The Avatar feature seems appropriate for this purpose. However, when I get the Avatar url (using AvatarInfoProvider.GetUserAvatarImageUrl() ) it returns a relative url that is only accessible on the CMS/back end site. Is it possible to get this image via a url on the MVC/front end site?

An alternative would be to add a custom field to Users to store the image, but when I tried to do this, it would only allow me to select images from the content tree. Is there a way to manage these images in the media library, or is the only option to pull from the content tree?

Thanks!

Correct Answer

Dragoljub Ilic answered on August 1, 2019 11:00

Hi Emiliy,

You probably selected 'File selection' (or 'Image selection') as form control and because of that you are able to select only files from content tree. You should change it to 'Media selection' and then you can chose selection between Media library or content tree.

Best regards, Dragoljub

0 votesVote for this answer Unmark Correct answer

   Please, sign in to be able to submit a new answer.