Skip to content

background

Experiments

Displays a full-screen background image behind the stimuli for one trial. Typical use: a scene or board image over which word/image stimuli are shown or dragged.

Put an image filename with its extension in the cell, e.g. board.png. The file is loaded from the project’s stimuli. Only a filename is supported, and only the first filename-like part of the cell is used: letters, digits, underscores, commas, spaces, and hyphens, followed by a dot and a 1-4 letter extension.

ValueEffect
empty cellNo background
<name>.<ext>, e.g. forest.jpgShown centered, not repeated, behind the whole page while the stimuli are on screen
CSS values (linear-gradient(...), url(...) repeat, colors)NOT supported. Only a filename-like part is extracted; from url('pattern.png') repeat only pattern.png would be used; a gradient with no dotted token matches nothing

When the column is absent or the cell is left empty, no background image is shown. A background image lasts exactly one trial: at the start of every trial the page is repainted with the project’s background color, which clears the previous trial’s image.

  • Shown only on stimulus trials (images, words, audio, video); instruction and form trials never show a background image.
  • Preloading: background images are preloaded before the experiment starts.
  • Screen calibration: when calibration is active, the background image is scaled to match the calibrated screen size.
  • Drag responses: with draggable stimuli, the drag limits default to the background image’s bounds, so the background defines the playing field.
  • bgColor: the two combine. The bgColor color fills the page and the background image is painted on top of it.
typestim1stimFormatbackgroundresponseType
testtoken.pngboard.jpgdrag

board.jpg is shown centered behind the draggable stimulus, and drags are limited to the board’s area.

typestim1stimFormatbackground
testappleword

No background image.

  • Only the first filename-like part of the cell is used; everything else in the cell is ignored.
  • An updated stimulus file is picked up on the next run, never a cached older copy.
  • Outside screen calibration, the image displays at its natural size; there is no column syntax to resize it.

background appears in these worked recipes:

  • Drag to respond: Let participants drag stimuli into position over a scene and record where each one lands.