Possible to have participants upload own photos to be used as stimuli? (or participant-supplied string)

I’m wondering if it is theoretically possible to generate an experiment in which some of the stimuli are provided by the participant. I’d like to have online participants upload 4 different images (personal photos). Their own photos would then be used as stimuli for two different trial types, so each of the two trial types has two possible images for display). Is this something I could do in PsychoPy?

Alternatively, if this is not feasible, is it possible for participants to provide two names, which are then called in subsequent trials where the stimulus is a text prompt (as an alternative to using personal photos as stimuli), e.g., they’d see text starting with “Think about [USER-PROVIDED NAME]…”

I’ve done this before with a dot probe task. I manually uploaded the images with specific filenames based on the participant number (e.g. 1.jpg and 1s.jpg) and then loaded them dynamically in PsychoPy based on expInfo[‘participant’]

To load images dynamically this you’ll need to use code or a 2022 version
https://psychopy.org/online/resources.html

1 Like

Thanks! So am I understanding correctly that in this case, you were supplied the images by participants, then uploaded them yourself before deploying a particular version of the task to them?

Correct – it was for a daily training intervention so the participants had already taken part in a self reference study and a third of them were then asked to supply photos of themselves (smiling and sad).

1 Like

I see. That’s good to know! For the Prolific/online recruitment version of this task I was hoping to have participants be able to upload the photos themselves and have those automatically called by the correct trial type, so I’m not involved in coordinating task administration with them. But I was wondering about the kind of scenario you describe as well, for a different version of the experiment with a clinical sample.

The other possibility (which may get easier in the near future) is to use the webcam to take a photo and then present that back to the participant later. I haven’t done this myself, but this demo might help.

1 Like

Hi There,

I have actually done this exact thing (take photo with webcam an show back to participant in an image).

Here is the code for that. Rebecca Hirst / webcam_photo_demo · GitLab

Becca

1 Like

Oh, very cool, that looks like an interesting option if they have a way to hold their photos up to the webcam…
The photos I want to use are actually photos not of the participant themself, but photos of loved ones that they have already (sorry if that wasn’t clear!)

Ahhh ok in that case that isn’t yet an option, but let me suggest a workaround we’ve used before

  1. Assign a unique participant ID e.g. 111
  2. Have the participant send you the photos.
  3. Save those photos to your project with the participant ID e.g. “images/loved_one_111.jpg”
  4. When you set the image in the experiment use $'images/loved_one_' + expInfo['participant'] + '.jpg' and set the field to "set every repeat.

Note: make sure to add the image to the resources to load in the Experiment settings.

It is a manual step for the researcher I know, so not ideal, but it might provide a temporary solution.

Hope this helps,
Becca

1 Like

Awesome, that’s probably as close as I can get for now! Thank you.

If someone is looking for “uploading images / data”, I would like to share a JavaScript based approach to “locally” use images/ other files in a PsychoJS Experiment. You can actually convert every local data to a blob. By making a HTMLImageElement from this Blob you can use it, to set a global variable, that then can be used to set Images during the experiment.

So theoretically, it is possible to let the particpants “upload” their images on the fly. Keep in mind, that the images are just locally “present in the browser” and are not actually uploaded to the server. And it is important that the participants “do it the right way” (its not really error-proof).

https://run.pavlovia.org/luke.boelling/localimagetoblobhtmlelement/

2 Likes

That looks great. If you have time, please could you add a license to your code (to clarify the terms of reuse) and add it to your online demo post.

Not actually uploaded sounds fine, though I suspect it would be possible to upload via saving the window (getMovieFrame?).

1 Like