Custom polygon vertices not translating to JS

I found an old related post (see below) saying that rect stim are the only option when converting to js. I suppose my best option may be using image files instead of code?