1. Home
  2. Docs
  3. Core concepts
  4. Protocol
  5. Image

Image

The image stimulus presents a single image.

KeyRequired?Description
typeRequired“image”
stimulus_uuidOptionalInternal identifier of the stimulus.
nameDeprecatedFilename of the stimulus, e.g. advertisement.jpg.
urlDeprecatedExternal URL that contains the stimulus.
fixationTimeOptionalTime in milliseconds the fixation cross is displayed.
displayTimeOptionalTime in milliseconds the stimulus is displayed.
minimumDisplayTimeOptionalMinimum time the stimulus has to be displayed.
continueOnClickOptionalAllow the participant to skip the stimulus using a mouse click.
fitOptionalDetermines how images are scaled.

What image to display will be resolved in the following order:

  • url: If a URL is present, the stimulus will be directly served from that URL.
  • id: The stimulus referenced by this identifier will be served from our server. The stimulus must be associated with the experiment this protocol belongs to.
  • name: The stimulus with this name is found in the current experiment and will be presented.

If an image is too large for the screen it is usually scaled to fit the screen, keeping the aspect ratio constant. The fit parameter determines precisely how the image will be scaled:

  • fill: Maximizes the image while maintaining the aspect ratio. The image will be cropped in order to fill the screen.
  • cover: Same as fill
  • fill-horizontal: Similar to fill, but will only crop the top and bottom parts of the image. If the image is smaller than the vertical dimension, it will be centered instead.
  • fit: Maximizes the image while maintaining the aspect ratio. The image will not be cropped, resulting in black bars in case the aspect ratio of the image is not identical to the aspect ratio of the screen.
  • contain: same as fit
  • stretch: Maximized the image such that it fills the entire
  • screen. The aspect ratio might change as a result.
  • center: Place the image in the centre of the screen.

The default value is “fit”.

Use the minimumDisplayTime and continueOnClick parameters to indicate weather skipping stimuli using a mouse-click is allowed. Clicks before the minimumDisplayTime has elapsed will be ignored. If displayTime is set the system will continue after the displayTime is reached even if the mouse button was not pressed.