# Image doesn't show

**URL:** <https://discourse.processing.org/t/image-doesnt-show/24693>\
**Category:** Coding Questions\
**Created:** [October 18, 2020, 11:03pm UTC](https://discourse.processing.org/t/image-doesnt-show/24693 "2020-10-18T23:03:04Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![lukeltw](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@lukeltw](https://discourse.processing.org/u/lukeltw)\
**Post date:** [October 18, 2020, 11:03pm UTC](https://discourse.processing.org/t/image-doesnt-show/24693/1 "2020-10-18T23:03:04Z")

</div>

Can someone tell me where is wrong?

I am a new programmer, I try to run my code, then I got this:

The file “psa.jpg” is missing or inaccessible, make sure the URL is valid or that the file has been added to your sketch and is readable.  
NullPointerException

This is the code:

PImage photo;

void setup() {  
size(100, 100);  
photo = loadImage(“psa.jpg”);  
}

void draw() {  
image(photo, 0, 0);  
}

I double-checked the name of my picture, it is as same as “psa.jpg”

---

<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 18, 2020, 11:08pm UTC](https://discourse.processing.org/t/image-doesnt-show/24693/2 "2020-10-18T23:08:09Z")

</div>

Hello,

It works fine here.

Reference:  
_[https://processing.org/reference/loadImage\_.html](https://processing.org/reference/loadImage_.html)_

Is it in the correct folder?

`:)`

Please format your code:  
[https://discourse.processing.org/faq#format-your-code](https://discourse.processing.org/faq#format-your-code)

---

<div class="post-metadata">

**Author:** ![lukeltw](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@lukeltw](https://discourse.processing.org/u/lukeltw)\
**Post date:** [October 19, 2020, 2:01am UTC](https://discourse.processing.org/t/image-doesnt-show/24693/3 "2020-10-19T02:01:55Z")

</div>

```auto
PImage photo;

void setup() {
  size(100, 100);
  photo = loadImage("psa.jpg");
}

void draw() {
  image(photo, 0, 0);
}

```

---

<div class="post-metadata">

**Author:** ![lukeltw](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@lukeltw](https://discourse.processing.org/u/lukeltw)\
**Post date:** [October 19, 2020, 2:02am UTC](https://discourse.processing.org/t/image-doesnt-show/24693/4 "2020-10-19T02:02:28Z")

</div>

![screenshot](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/7/782896337d951e9eacea72e7d63702efe9cd989d.jpeg)

---

<div class="post-metadata">

**Author:** ![Chrisir](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/chrisir/32/45_2.png) [@Chrisir](https://discourse.processing.org/u/Chrisir)\
**Post date:** [October 19, 2020, 10:56am UTC](https://discourse.processing.org/t/image-doesnt-show/24693/5 "2020-10-19T10:56:35Z")

</div>

you can hit **ctrl-k** in processing to open the folder of your sketch.

here (or in the data folder inside it) the file psa.jpg must be!!!

Make sure it’s the right spelling, it’s case-sensitive, so JPG is not allowed…

…and .png is now allowed…

---

<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 19, 2020, 11:41am UTC](https://discourse.processing.org/t/image-doesnt-show/24693/6 "2020-10-19T11:41:48Z")

</div>

@lukeltw,

> [@glv](#):
>
> Is it in the correct folder?

Is it in the correct folder?

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/a/a3a4f56aad09bbad7a98deedd0d5e96cf745b76e.png)

The reference for loadImage() that I provided states:  
“To load correctly, images must be located in the …”  
You can look it up.

If you drag and drop an image onto the sketch window it will put in the directory referenced in loadImage().

`:)`

---

<div class="post-metadata">

**Author:** ![lukeltw](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@lukeltw](https://discourse.processing.org/u/lukeltw)\
**Post date:** [October 20, 2020, 6:40pm UTC](https://discourse.processing.org/t/image-doesnt-show/24693/8 "2020-10-20T18:40:07Z")

</div>

yes, now its working, thank you!

---

<div class="post-metadata">

**Author:** ![lukeltw](https://avatars.discourse-cdn.com/v4/letter/l/d6d6ee/32.png) [@lukeltw](https://discourse.processing.org/u/lukeltw)\
**Post date:** [October 20, 2020, 6:41pm UTC](https://discourse.processing.org/t/image-doesnt-show/24693/9 "2020-10-20T18:41:08Z")

</div>

Its working now! Thank you for your help! @glv🙂
