-
Hi! With this being my first time using jspsych, I am having trouble getting images to load side by side for a picture selection task. I would like two pictures to show up (1a and 1b) and for the participants to select which picture best matches the sentence described (which will derive from a self-paced reading component of the experiment). Right now, the file structure has the experiment alongside a folder 'img' that contains the .png files. When I try to run the experiment, it fails to show any pictures. Below is what I have so far.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @hblam There are two things to change here:
var preload = {
type: jsPsychPreload,
images: ['img/1a.png', 'img/1b.png']
}; |
Beta Was this translation helpful? Give feedback.
Hi @hblam
There are two things to change here:
stimulus
parameter fortrial_1
is missing"
around the file names. It should be'<img src="img/1a.png" /><img src="img/1b.png" />'
auto_preload
method for the preload trial won't work in this context because the images are added as HTML instead of through an image-based plugin. Instead use: