# How to load image in Android Studio

**URL:** <https://discourse.processing.org/t/how-to-load-image-in-android-studio/15756>\
**Category:** Processing for Android\
**Created:** [November 24, 2019, 6:49am UTC](https://discourse.processing.org/t/how-to-load-image-in-android-studio/15756 "2019-11-24T06:49:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![soet\_za](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@soet\_za](https://discourse.processing.org/u/soet_za)\
**Post date:** [November 24, 2019, 6:49am UTC](https://discourse.processing.org/t/how-to-load-image-in-android-studio/15756/1 "2019-11-24T06:49:14Z")

</div>

How do I load an image and where do I place the image file, in which directory?

example:  
public PImage img;

public void setup(){  
img = loadImage(“image.png”);  
}

public void draw(){  
image(img , 0, 0, 64, 64);  
}

---

<div class="post-metadata">

**Author:** ![soet\_za](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@soet\_za](https://discourse.processing.org/u/soet_za)\
**Post date:** [November 24, 2019, 6:57am UTC](https://discourse.processing.org/t/how-to-load-image-in-android-studio/15756/2 "2019-11-24T06:57:36Z")

</div>

2019-11-24 08:55:56.508 11048-11084/com.example.hi W/System.err: java.io.FileNotFoundException: /data/user/0/com.example.hi/files/image.png: open failed: ENOENT (No such file or directory)

I created the folder and placed the image inside but it still returns above error

---

<div class="post-metadata">

**Author:** ![akenaton](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@akenaton](https://discourse.processing.org/u/akenaton)\
**Post date:** [November 24, 2019, 11:01am UTC](https://discourse.processing.org/t/how-to-load-image-in-android-studio/15756/3 "2019-11-24T11:01:10Z")

</div>

@soet_za ===  
have you imported your app inside AS in the corect way? - I mean “from existing code”??? - If yes AS has created a folder for your data (it is the assets folder) and your image is here…

---

<div class="post-metadata">

**Author:** ![soet\_za](https://avatars.discourse-cdn.com/v4/letter/s/90ced4/32.png) [@soet\_za](https://discourse.processing.org/u/soet_za)\
**Post date:** [November 24, 2019, 11:05am UTC](https://discourse.processing.org/t/how-to-load-image-in-android-studio/15756/4 "2019-11-24T11:05:27Z")

</div>

assets go in main/assest…figured it out. Thanks
