r/p5js • u/ElectroBeast_ • Oct 23 '26
Loading Errors
My project has about 50 images so far and every time i try run my code, it comes up with failed to load image over and over. How do i fix this please help
2
Upvotes
2
u/JoeWhy2 Oct 23 '26
Are you doing this in the P5JS editor and have you looked at the updates to p5.js v2?
1
u/forgotmyusernamedamm Oct 23 '26
Does it work with one image? If so, does it work with 20? How many images break it?
Is it failing to load on the same image each time? Make 100% sure there are no spelling mistakes and you have the extension correct.
Try loading just that image on its own.
What version of p5.js are you using? If you're using 2.0 or greater are you using the async setup?
How big are your images? If you are compressing them anyways, try reducing the size before importing.
If none of this works, trying to isolate the problem into the shortest code possible. Eliminate everything but the bug, then give us some code to look at.