# Get access to an image that is not in the theme

**URL:** https://forums.concretecms.org/t/get-access-to-an-image-that-is-not-in-the-theme/432
**Category:** Developing with Concrete
**Created:** [July 23, 2021, 12:57pm UTC](https://forums.concretecms.org/t/get-access-to-an-image-that-is-not-in-the-theme/432 "2021-07-23T12:57:09Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![ArieleSgheiza](https://forums.concretecms.org/user_avatar/forums.concretecms.org/arielesgheiza/32/83_2.png) [@ArieleSgheiza](https://forums.concretecms.org/u/ArieleSgheiza)
#### Post date: [July 23, 2021, 12:57pm UTC](https://forums.concretecms.org/t/get-access-to-an-image-that-is-not-in-the-theme/432/1 "2021-07-23T12:57:09Z")

</div>

Hi! I’m having troubles trying to get access to an image that is not in the folder of the theme. I want to stock the images in the packages folder so that I can access them from all the themes, but I can’t find a way to do that.  
I tried to use getPackagePath() but I get this error: Call to undefined method Concrete\Core\Page\View\PageView::getPackagePath().  
Also, if I write the simple path (/var/www/html/concrete5/packages/uploadsImages/name\_image) it doesn’t find the image. If I check the console, I can see that it search for the image just in the theme folder, it doesn’t go up to the package folder.  
Any idea of what I can do? Thanks a lot in advance!  
PS:  
/var/www/html/concrete5/packages/uploadsImages/name\_image → path for the image  
/var/www/html/concrete5/packages/cherche/themes/theme\_cherche → theme path

---

<div class="post-metadata">

### Author: ![anon83226287](https://forums.concretecms.org/letter_avatar_proxy/v4/letter/a/9de0a6/32.png) [@anon83226287](https://forums.concretecms.org/u/anon83226287)
#### Post date: [July 23, 2021, 1:25pm UTC](https://forums.concretecms.org/t/get-access-to-an-image-that-is-not-in-the-theme/432/2 "2021-07-23T13:25:56Z")

</div>

you could try using an absolute path like:  
[https://yourdomain.com/packages/theme-name/images/your-image.png](https://yourdomain.com/packages/theme-name/images/your-image.png)

---

<div class="post-metadata">

### Author: ![ArieleSgheiza](https://forums.concretecms.org/user_avatar/forums.concretecms.org/arielesgheiza/32/83_2.png) [@ArieleSgheiza](https://forums.concretecms.org/u/ArieleSgheiza)
#### Post date: [July 23, 2021, 1:44pm UTC](https://forums.concretecms.org/t/get-access-to-an-image-that-is-not-in-the-theme/432/3 "2021-07-23T13:44:21Z")

</div>

When I try this it still doesn’t work and in the console it gives me this error: Failed to load resource: the server responded with a status of 404 (Not Found).  
Any idea why? It also gave the same error if I write the path without the domain.

---

<div class="post-metadata">

### Author: ![JohntheFish](https://forums.concretecms.org/user_avatar/forums.concretecms.org/johnthefish/32/3767_2.png) [@JohntheFish](https://forums.concretecms.org/u/JohntheFish)
#### Post date: [July 23, 2021, 1:48pm UTC](https://forums.concretecms.org/t/get-access-to-an-image-that-is-not-in-the-theme/432/4 "2021-07-23T13:48:38Z")

</div>

You need to be very sure of your images for this. Unless you get complicated, showing images directly out of a package folder bypasses all the thumbnail mechanisms and picture element building the core provides.

---

<div class="post-metadata">

### Author: ![ArieleSgheiza](https://forums.concretecms.org/user_avatar/forums.concretecms.org/arielesgheiza/32/83_2.png) [@ArieleSgheiza](https://forums.concretecms.org/u/ArieleSgheiza)
#### Post date: [July 23, 2021, 1:56pm UTC](https://forums.concretecms.org/t/get-access-to-an-image-that-is-not-in-the-theme/432/5 "2021-07-23T13:56:21Z")

</div>

You maybe know another way to do it?

---

<div class="post-metadata">

### Author: ![JohntheFish](https://forums.concretecms.org/user_avatar/forums.concretecms.org/johnthefish/32/3767_2.png) [@JohntheFish](https://forums.concretecms.org/u/JohntheFish)
#### Post date: [July 23, 2021, 2:02pm UTC](https://forums.concretecms.org/t/get-access-to-an-image-that-is-not-in-the-theme/432/6 "2021-07-23T14:02:54Z")

</div>

For most applications, I would import them into the file manager during install, record the fIDs, then use the same mechanisms the core blocks use to display them. A bonus would be the images would be available to all uses, not just the coded uses.

For themes or theme-like applications, where I was managing everything to do with the file size, such as fixed banner images, then as themes do to show images bundled with the theme.
