Custom Images linked to Users

Hello there!   I want to create a functionality for users to add custom pictures as "attributes" in their profile settings. These pictures will then show up in different parts of the app.   I know how to upload pictures and I connected my custom image entity to the user and system.image but I can't for the life of me find a way to make it possible for the user to do the following:   upload the picture by themselves and see it in their settings. allow only 1 picture per attribute (imagine pic1 pic2 pic3 just like they were username or birthday fields one can fill in his own profile settings). show the picture currently uploaded if one is already there.   Thanks for the help!
2 answers

Hey Andrea!


Well to implement that you have multiple ways. I'm gonna tell you one.


As I understand there is a fixed number of attributes what you can do is:


- The user can have multiple custom images.

- Add to the custom image entity an identifier attribute to know exactly which "attribute" represents. (It can be an enumaration, number, string. For example: "Profile Pic")

- On the pages, check if there is an image for that user (as they are linked) with that identifier- If yes you show the previous image - If not you just allow the user to upload a new one.

- When you add a new one, you need to set the proper identifier, so next time you will know that there is a image for that.


I don't know if this helps, if you have any other question let me know!


Kind regards,



Hey Andrea,


Maybe I didn't understand your question so well, but this how i will do it

e.g. User entity 1-* Picture (Sys.Image)

        Attribute - FullName, Birthday, Pic1, Pic2


On Edit profile you will have field that need to be filled e.g. Birthday add OnChange function that will create one new entity Picture and it's will be associated to User then with this flow you will make sure that all filed that user enter will have picture, you can always add more custom logic if neede.


hope this help you


Best regards, Slavko