Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Problem with preloading images with jsPsych/JATOS on server (Mindprobe)

Hi guys,

I'm sorry if I ask something really stupid, but I have no clue of how to work with servers. I've got my code on my local JATOS, and preloading images in jsPsych works alright, but when I import the experiment on the JATOS server, I get an error message:

"Error loading file:[file path/file name].png

File did not begin loading. Check that file path is correct and reachable by the browser, and that loading is not blocked by cross-origin resource sharing (CORS) errors."

If I inactivate the preloading part of the code, images are displayed alright in the trials, but as it is a reaction time experiment I would prefer preloading them to prevent any issues with slow internet connections etc.

My code in short is the following:

// initialize jsPsych
 var jsPsych = initJsPsych({
      on_finish: () => jatos.endStudy(

// create timeline
var timeline = [];

// define array of images to preload, e.g.
var images = [
// preload images
var preload = {
      type: jsPsychPreload,
      images: images,
      show_detailed_errors: true,
      message: 'Please wait.'


// here comes the code of the experiment proper

// start experiment
jatos.onLoad(function () {

I imagine it has to do with access to cache? As far as I understood, there are default specifications of temp file locations that should work alright, but apparently I need to change something here. Or maybe it is something else and, again, sorry if this is a really stupid question.

I really would appreciate your help on this topic! Thank you so much in advance for any hint!


  • Hi,

    Preloading of images should work the same way as normal loading. But maybe jsPsych does something with the URL path it uses to open the file. Where are those image files stored? What is the file structure of your experiment?



  • Hi,

    Thank you so much for answering! First, I stored the image files in separate folders called "stimuli" and "practice_imgs", then I tried out putting them all directly in the experiment folder in study_assets_root. It was all the same in the two cases: images load in the experiment, but preloading fails. In the code, I use relative paths.

    In the attached pictures you can see the error message with the file path in the online experiment and the folder content in the experiment folder in study_assets_root on my computer. The different html-files are the different components of the experiment.

    Best, Ines

  • Hi Ines,

    Your file structure and the relative path you are using seem to be fine. But I could have a closer look if you agree. Can you share your study with me? The easiest would be to add user 'admin' as a member of your study. But if your study contains sensitive data you can also export it and send me a stripped-down version of it.



  • Great, thank you very much! I have just added you. The error occurs with the second component.

  • You develop your study on Windows, aren't you? Windows isn't very strict with letters and capitalization. But Mindprobe-JATOS runs on Linux and there it is. Your filename spelling must be precisely the same in your file system and the code.

     // define image array for preloading
       var images = [

    I changed coffee_s1.JPG -> coffee_s1.jpg and coffee_s2.JPG -> coffee_s2.jpg and then the second component worked with me. But to be sure I'd recommend to check all other filenames too.



  • Hi Kristian,

    thank you so much! Yes, I am working on Windows. I always looked for errors in the code, and therefore I also searched the wrong questions to find the answer elsewhere in forums.... Now it works alright. Many thanks!!



Sign In or Register to comment.

agen judi bola , sportbook, casino, togel, number game, singapore, tangkas, basket, slot, poker, dominoqq, agen bola. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 50.000 ,- bonus cashback hingga 10% , diskon togel hingga 66% bisa bermain di android dan IOS kapanpun dan dimana pun. poker , bandarq , aduq, domino qq , dominobet. Semua permainan bisa dimainkan hanya dengan 1 ID. minimal deposit 10.000 ,- bonus turnover 0.5% dan bonus referral 20%. Bonus - bonus yang dihadirkan bisa terbilang cukup tinggi dan memuaskan, anda hanya perlu memasang pada situs yang memberikan bursa pasaran terbaik yaitu Bola168. Situs penyedia segala jenis permainan poker online kini semakin banyak ditemukan di Internet, salah satunya TahunQQ merupakan situs Agen Judi Domino66 Dan BandarQ Terpercaya yang mampu memberikan banyak provit bagi bettornya. Permainan Yang Di Sediakan Dewi365 Juga sangat banyak Dan menarik dan Peluang untuk memenangkan Taruhan Judi online ini juga sangat mudah . Mainkan Segera Taruhan Sportbook anda bersama Agen Judi Bola Bersama Dewi365 Kemenangan Anda Berapa pun akan Terbayarkan. Tersedia 9 macam permainan seru yang bisa kamu mainkan hanya di dalam 1 ID saja. Permainan seru yang tersedia seperti Poker, Domino QQ Dan juga BandarQ Online. Semuanya tersedia lengkap hanya di ABGQQ. Situs ABGQQ sangat mudah dimenangkan, kamu juga akan mendapatkan mega bonus dan setiap pemain berhak mendapatkan cashback mingguan. ABGQQ juga telah diakui sebagai Bandar Domino Online yang menjamin sistem FAIR PLAY disetiap permainan yang bisa dimainkan dengan deposit minimal hanya Rp.25.000. DEWI365 adalah Bandar Judi Bola Terpercaya & resmi dan terpercaya di indonesia. Situs judi bola ini menyediakan fasilitas bagi anda untuk dapat bermain memainkan permainan judi bola. Didalam situs ini memiliki berbagai permainan taruhan bola terlengkap seperti Sbobet, yang membuat DEWI365 menjadi situs judi bola terbaik dan terpercaya di Indonesia. Tentunya sebagai situs yang bertugas sebagai Bandar Poker Online pastinya akan berusaha untuk menjaga semua informasi dan keamanan yang terdapat di POKERQQ13. Kotakqq adalah situs Judi Poker Online Terpercayayang menyediakan 9 jenis permainan sakong online, dominoqq, domino99, bandarq, bandar ceme, aduq, poker online, bandar poker, balak66, perang baccarat, dan capsa susun. Dengan minimal deposit withdraw 15.000 Anda sudah bisa memainkan semua permaina pkv games di situs kami. Jackpot besar,Win rate tinggi, Fair play, PKV Games