I am using pix units to display my images. My images come in different sizes. Image paths are set on every loop based on a conditions file. In Psychopy Builder I left the image component’s Size field empty which made Psychopy Builder just use the default image dimensions as I want (i.e. would show the image as the size it actually is in my .png file). However when I export to Javascript and run on Pavlovia I get an error:
Is there an easy fix for this to force PsychoJs to just use the default image size of the .png file?
With some tinkering in the console, I found that the image’s original dimensions (learn_white_sat is my image component name) can be accessed using this JS code:
I know I can probably just use this but was wondering if there is a better/simpler way to accomplish this as it seems like a pretty simple problem, and might prevent me from having to draw from this manually in my javascript code for all my images as I continue to build my experiment in Builder.
Thank you!