DB structure - profile pictures

Hello everyone!

I’m trying to build a profile picture section in my app, i want to do something like the picture below.

I don’t know how to structure my DB for achieving this, the way i found is by hard-linking weach image to a field in the user data type (each image field is an image):

  • Profile Picture
  • Picture 1
  • Picture 2
  • Pic3… and so on

The problem with this is that it isn’t scalable, if i want to add 40 pictures in the future, i need to add more fields, i think that something more logical would be:


  • Profile Picture
  • Other Pictures (list of pictures)

where each picture is identified by its index {Pic1, Pic2, Pic3}. But i have to find a way to link that with the UI, so if i upload a picture (i.e box 4) i would modify picture on that index and not upload a new picture in the Pictures Array.

Thank you in advance, hope i was clear enough!


If you need to store specific information about each picture (even if it’s just the picture number), then you need to create a new datatype for that.

So create a datatype called something like ‘User Picture’

Have a field to link it to the User (you could just use the built in Created by field for this), a field for ‘Picture’ (of type image), a field for ‘Profile Pic’ (of type Yes/No), a field for 'Picture Number (of type Number), and any other fields for relevant data you need to store about the picture.

Then on your pages you can do a search for ‘User Pictures’ who’s ‘User’ (or ‘Create by’) is the Current User, and display them however you want (i.e. show the profile pic, and the other pics in a RG in order of picture number, or any way you like).

Then if you need to change Picture 4, for example, you can either make changes to a User Picture, and refer to that user’s Picture 4, and just change the image.

Or, you can delete the existing Picture 4, and create a new one with a new Image - depending on what exactly you need to do.

1 Like