# 404 image not found

**URL:** <https://discourse.processing.org/t/404-image-not-found/14649>\
**Category:** Coding Questions\
**Created:** [October 13, 2019, 10:22am UTC](https://discourse.processing.org/t/404-image-not-found/14649 "2019-10-13T10:22:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sam](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sam/32/6739_2.png) [@sam](https://discourse.processing.org/u/sam)\
**Post date:** [October 13, 2019, 10:22am UTC](https://discourse.processing.org/t/404-image-not-found/14649/1 "2019-10-13T10:22:15Z")

</div>

Here is my code

```auto
var canvas;
let dirtImg;

function preload() {
  dirtImg = loadImage('assets/blocks/dirt.png');
}

function setup() {
  // put setup code here
  canvas = createCanvas(window.innerWidth, window.innerHeight, WEBGL);
}

function draw() {
  // put drawing code here
  background(100);

  strokeWeight(1); 
  //fill(50);
  push();
  translate(100, 100);
  //rotateY(1.25);
  //rotateX(-0.9);
  texture(dirtImg);
  box(100);
  pop();
}

window.onresize = function() {
  var w = window.innerWidth;
  var h = window.innerHeight;  
  canvas.size(w,h);
  width = w;
  height = h;
};

```

Im using Google’s Firebase as the sever however the image “assets/blocks/dirt.png” is not being loaded on to the cube / box . How do I fix it?

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [October 13, 2019, 3:47pm UTC](https://discourse.processing.org/t/404-image-not-found/14649/2 "2019-10-13T15:47:38Z")

</div>

Hello,

This is all I can offer…

If I have **dirt.png** in the local sketch folder **assets/blocks/** it works.

I found a URL that worked:  
dirtImg = loadImage(“[https://farm3.staticflickr.com/2849/11011320426\_c8ce1bff32\_q.jpg](https://farm3.staticflickr.com/2849/11011320426_c8ce1bff32_q.jpg)”);

Some links did not work!

![dirt](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/8/808cb09b27b20c45d69d9215937639a91dc228f1.png)

🙂

References:  
[https://codepen.io/ajspadial/pen/QjdWxJ](https://codepen.io/ajspadial/pen/QjdWxJ)  
[https://p5js.org/reference/#/p5/loadImage](https://p5js.org/reference/#/p5/loadImage)
