Show Image after upload

Hi

I have an upload button to upload an image to form which eventually is submitted and sends data to a collection.

What I need to figure out is when the image is uploaded i need to show the image back to the user. I have only just started playing with Wix and have minimal js experience so any help gratefully received.

What about something like a members profile which can be updated?

https://support.wix.com/en/article/corvid-tutorial-building-your-own-members-area
https://support.wix.com/en/article/corvid-tutorial-creating-custom-member-profile-pages

As you are creating a new dataset for the tutorial above. then you can simply use this collection info on another page.

Amazing, thanks very much. I will look into that

You can upload it and then assign it to a slider gallery or an image place holder.
Something like this:

$w('#uploadButton1').onChange(() => {
        setTimeout(() => {
            uploadFile();
        }, 100)
    })
    //not sure whether or not you need a timeout here, but I put it here to be on the safe side.
 
function uploadFile() {
 if ($w("#uploadButton1").value.length > 0) {
        $w("#uploadButton1").startUpload()
            .then((uploadedFile) => {
                $w("#gallery1").items = [{
                 "type": "image",
                 "src": uploadedFile.url
                }];
                $w("#gallery1").expand();
            })
            .catch((uploadError) => {
                console.log(`File upload error: ${uploadError.errorCode}`);
            });
    } else {
        $w("#gallery1").collapse();
    }
}