How do I use a local server for loadimage() in p5.js?

I am trying to make a game and it is working perfectly fine, until I need to use a PNG file as my background. I tried
function preload() {
space=loadImage(‘images/space.png’);

}
but it shows "loading…" and it never ends up loading. Then I was told I should try a local server and I tried to paste the link of the file into the previous command but it is showing the same thing. I need some explanations with how the local server works. I tried Filestash but Im not sure how to do this.

28 thoughts on “How do I use a local server for loadimage() in p5.js?”

Leave a Comment