# Images failing to fetch in p5.js web editor, but only on specific browsers

**URL:** <https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227>\
**Category:** p5.js\
**Created:** [November 16, 2023, 8:22pm UTC](https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227 "2023-11-16T20:22:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pstephan4](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@pstephan4](https://discourse.processing.org/u/pstephan4)\
**Post date:** [November 16, 2023, 8:22pm UTC](https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227/1 "2023-11-16T20:22:20Z")

</div>

I am a teacher and have noticed this issue repeatedly: several students will run a project with images and only one will get an error that says “couldn’t fetch”. The students are all working from a duplicated starter file so I know that the images are correctly loaded. I’ve also verified that they all have the correct code.

The best way I’ve been able to solve it is by having the student in question use a different browser, and this usually works.

My question is, is there a specific browser or maybe a browser extension my students should be avoiding? Needless to say they find this error quite frustrating since they’ve coded everything correctly but are not getting any output.

Here’s an example of the code: [p5.js Web Editor](https://editor.p5js.org/pstephan4/sketches/Kghq9FzYy)

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [November 17, 2023, 6:06pm UTC](https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227/2 "2023-11-17T18:06:18Z")

</div>

Hi @pstephan4,

Maybe a good info would be, which browser the student used ?  
I’ve tested on Chrome, Firefox, Samsung Internet and Edge. All worked as expected.  
General it should work with all modern browsers which supports javascript.

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![pstephan4](https://avatars.discourse-cdn.com/v4/letter/p/c4cdca/32.png) [@pstephan4](https://discourse.processing.org/u/pstephan4)\
**Post date:** [November 20, 2023, 5:46pm UTC](https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227/3 "2023-11-20T17:46:45Z")

</div>

Hi @mnse ,

Each time the issue has come up the student has been using Chrome. This has happened to multiple different students now. But of course I am able to run the code without issue when using Chrome.

I don’t know if maybe there is an issue with certain Chrome extensions or settings that would cause this?

---

<div class="post-metadata">

**Author:** ![mnse](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/mnse/32/16520_2.png) [@mnse](https://discourse.processing.org/u/mnse)\
**Post date:** [November 21, 2023, 7:31am UTC](https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227/4 "2023-11-21T07:31:38Z")

</div>

Hi @pstephan4,

hard to say as I’m not able to reproduce. Maybe check the browser console (DevTools) output for further details when happen. 🤷‍♂️

Cheers  
— mnse

---

<div class="post-metadata">

**Author:** ![eharkins](https://avatars.discourse-cdn.com/v4/letter/e/8797f3/32.png) [@eharkins](https://discourse.processing.org/u/eharkins)\
**Post date:** [February 17, 2024, 6:40pm UTC](https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227/5 "2024-02-17T18:40:53Z")

</div>

I am also a teacher and have posted about this problem. Today, using Chrome, I get a failed to fetch error with the P5.js [environment](https://editor.p5js.org/eharkins-DEMO/sketches/yenxnXCvP), but in [openprocessing.org](http://openprocessing.org) [environment](https://openprocessing.org/sketch/2181401), the six images all loaded properly.

---

<div class="post-metadata">

**Author:** ![the](https://avatars.discourse-cdn.com/v4/letter/t/e36b37/32.png) [@the](https://discourse.processing.org/u/the)\
**Post date:** [February 19, 2024, 12:02am UTC](https://discourse.processing.org/t/images-failing-to-fetch-in-p5-js-web-editor-but-only-on-specific-browsers/43227/6 "2024-02-19T00:02:16Z")

</div>

Im late to the game here, but I had the same issue. I moved to use createImg() and used .hide() to mimic the loadImage() functionality
