CS-foreach / creative-coding-p5js

Teaching creative coding in p5.js
https://cs-foreach.github.io/creative-coding-p5js/
MIT License
1 stars 1 forks source link

Duplicated `editor.p5js` sketches do not allow new uploaded image use in some cases #2

Open phentos opened 7 months ago

phentos commented 7 months ago

(below relocated from wiki, original author @NewtonLC )

Bug: loadImage doesn't work on new images after duplicating Problem: After duplicating the sketch, you can't load in new pictures. The images that came from the original sketch(that already work) will still work, but new images uploaded by the user will not.

How to fix:

Create a NEW folder, then upload the image into that folder. (Don't rename the image before trying it) If it works now, then try uploading the image into assets and trying again. After you complete the first two steps, all images should load in properly now.

(I tested this 3 times and it only works after you create a new folder, then upload it in the new folder, then try reuploading it normally)

My sketch