Is there any way to import a picture into a form as a user of the form

I have a form to register a person. I want to be able for the person to upload her/his picture and then for it to be visible when looking at the record.

The 'image' widget is for a static image coming from the Db design

There is an attachment widget, but nothing to show an image as far as I can see.

How can I go about that ?

The absolutely not "low-code" way could be an agent running on new/modified documents, which "converts" the graphics file. Or at least calculates the URL to open it. Then you could set the src attribute of an image element...

Yeah, I've been down that road.....

Just neither easy nor low-code. Definitely something that could be made better, IMHO.

The way we do this is to have the form contain an attachment widget, a website field (hidden) and also an image. Then when we render the form we can dynamically set the image item to the URL of the attached file.

In the onItemChange of the attachment item (we set the URL to the image):

var url = "http://localhost/volt-apps/secure/org/data/" + app.getUID() + "/F_Form1/attachment/" + BO.F_Attachment1.getValue().uid;
BO.F_WebLink1.setValue(url);

In the onItemChange of the website field (we set the URL to the image item) Note that this could all be done in one event:

if(BOA.getValue() !== "") {
page.F_Image1.setURL(BOA.getValue());
}