# Simple background image question

**URL:** <https://forums.kodeco.com/t/simple-background-image-question/61157>\
**Category:** tvOS\
**Created:** [January 31, 2019, 11:48pm UTC](https://forums.kodeco.com/t/simple-background-image-question/61157 "2019-01-31T23:48:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![perrycbrown](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/perrycbrown/32/81494_2.png) [@perrycbrown](https://forums.kodeco.com/u/perrycbrown)\
**Post date:** [January 31, 2019, 11:48pm UTC](https://forums.kodeco.com/t/simple-background-image-question/61157/1 "2019-01-31T23:48:50Z")

</div>

My TVML layout looks like this:

```
<?xml version="1.0" encoding="UTF-8"?>
<document>
<head>
</head>
  <mainTemplate>
    <background>
      <img src="https://www.myserver.com/images/myimage.jpg" />
    </background>
    <menuBar>
      <section>
        <menuItem>…</menuItem>
        <menuItem>…</menuItem>
      </section>
    </menuBar>
  </mainTemplate>
</document>

```

…but what if I want to reference that background image path within my tvOS app resources itself? Like

```
    <background>
      <img src="pkg:/images/myimage.jpg" />
    </background>

```

This has to be simple, but I’ve yet to find an answer in online docs. Thanks!

---

<div class="post-metadata">

**Author:** ![shogunkaramazov](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/shogunkaramazov/32/108826_2.png) [@shogunkaramazov](https://forums.kodeco.com/u/shogunkaramazov)\
**Post date:** [February 6, 2019, 5:13am UTC](https://forums.kodeco.com/t/simple-background-image-question/61157/2 "2019-02-06T05:13:28Z")

</div>

@perrycbrown Do you still have issues with this?

---

<div class="post-metadata">

**Author:** ![perrycbrown](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/perrycbrown/32/81494_2.png) [@perrycbrown](https://forums.kodeco.com/u/perrycbrown)\
**Post date:** [February 6, 2019, 2:23pm UTC](https://forums.kodeco.com/t/simple-background-image-question/61157/3 "2019-02-06T14:23:39Z")

</div>

Yes, I haven’t found a way to directly reference images within the app itself. The only thing I’ve seen so far is using a ResourceLoader that depends upon the name of the image in an XML file that is loaded with a page. That seems too complicated to me.

Any way to directly reference an image in the app’s resources?

---

<div class="post-metadata">

**Author:** ![perrycbrown](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/perrycbrown/32/81494_2.png) [@perrycbrown](https://forums.kodeco.com/u/perrycbrown)\
**Post date:** [February 7, 2019, 8:19pm UTC](https://forums.kodeco.com/t/simple-background-image-question/61157/4 "2019-02-07T20:19:33Z")

</div>

Since no one has an answer to this question, I assume there is no answer to it.

Too bad. It would have been so nice to allow TVML to reference in-app resources – like images – more simply.

---

<div class="post-metadata">

**Author:** ![system](https://s3.amazonaws.com/cdn.raywenderlich.com/community/forum-assets/noun-game-ghost-878668.png) [@system](https://forums.kodeco.com/u/system)\
**Post date:** [July 17, 2019, 3:48pm UTC](https://forums.kodeco.com/t/simple-background-image-question/61157/5 "2019-07-17T15:48:53Z")

</div>

Closed on July 17, 2019, 3:48pm UTC

This topic was automatically closed after 166 days. New replies are no longer allowed.
