# Getting a picture stored in the project given its name

**URL:** <https://forum.xojo.com/t/getting-a-picture-stored-in-the-project-given-its-name/88659>\
**Category:** iOS\
**Created:** [July 24, 2026, 5:48pm UTC](https://forum.xojo.com/t/getting-a-picture-stored-in-the-project-given-its-name/88659 "2026-07-24T17:48:35Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bob\_Gordon](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@Bob\_Gordon](https://forum.xojo.com/u/Bob_Gordon)\
**Post date:** [July 24, 2026, 5:48pm UTC](https://forum.xojo.com/t/getting-a-picture-stored-in-the-project-given-its-name/88659/1 "2026-07-24T17:48:35Z")

</div>

I have a bunch of pictures that will come along with the app. I have dragged a few (just testing now) into the project.

What I need to do is get access to a picture given its name. Is this possible?

---

<div class="post-metadata">

**Author:** ![Andrew\_Lambert](https://forum.xojo.com/user_avatar/forum.xojo.com/andrew_lambert/32/215_2.png) [@Andrew\_Lambert](https://forum.xojo.com/u/Andrew_Lambert)\
**Post date:** [July 24, 2026, 6:05pm UTC](https://forum.xojo.com/t/getting-a-picture-stored-in-the-project-given-its-name/88659/2 "2026-07-24T18:05:19Z")

</div>

You should be able to reference them directly:

```auto
Dim p As Picture = nameOfPicture 

```

Or

```auto
g.DrawPicture(nameOfPicture, 0, 0)

```

---

<div class="post-metadata">

**Author:** ![Bob\_Gordon](https://forum.xojo.com/letter_avatar_proxy/v4/letter/b/898d66/32.png) [@Bob\_Gordon](https://forum.xojo.com/u/Bob_Gordon)\
**Post date:** [July 24, 2026, 7:08pm UTC](https://forum.xojo.com/t/getting-a-picture-stored-in-the-project-given-its-name/88659/3 "2026-07-24T19:08:34Z")

</div>

The problem is that I have the name of the picture as a String as part of the other data it goes with.

---

<div class="post-metadata">

**Author:** ![Jared\_Feder](https://forum.xojo.com/user_avatar/forum.xojo.com/jared_feder/32/3036_2.png) [@Jared\_Feder](https://forum.xojo.com/u/Jared_Feder)\
**Post date:** [July 24, 2026, 7:12pm UTC](https://forum.xojo.com/t/getting-a-picture-stored-in-the-project-given-its-name/88659/4 "2026-07-24T19:12:17Z")

</div>

Write a `Select Case` statement in a helper method that takes the string as an input and returns a picture for each matching string using the syntax that Andrew recommended.

---

<div class="post-metadata">

**Author:** ![Jeremie\_L](https://forum.xojo.com/user_avatar/forum.xojo.com/jeremie_l/32/150_2.png) [@Jeremie\_L](https://forum.xojo.com/u/Jeremie_L)\
**Post date:** [July 24, 2026, 7:46pm UTC](https://forum.xojo.com/t/getting-a-picture-stored-in-the-project-given-its-name/88659/5 "2026-07-24T19:46:06Z")

</div>

If you have many big pictures, the correct way to do this is using an Asset Catalog. The App store will automatically trim asset catalogs to make your app thinner on @2x / @3x devices.

Unfortunately Xojo doesn’t support creating an asset catalog, although it does create one for the app’s icon.

Took me a few years to understand how to create an asset catalog and use it, took 20 minutes to set up using AI the last time I needed it.

* * *

In Xojo you can copy all pictures to your app using a build step and then open them using [SpecialFolder.Resource](https://documentation.xojo.com/api/files/specialfolder.html)
