# Ability to specify poster image height only

**URL:** <https://forum.developer.roku.com/t/ability-to-specify-poster-image-height-only/6691>\
**Category:** Archived\
**Tags:** roku-developer-program\
**Created:** [December 5, 2016, 10:03pm UTC](https://forum.developer.roku.com/t/ability-to-specify-poster-image-height-only/6691 "2016-12-05T22:03:53Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rynop](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@rynop](https://forum.developer.roku.com/u/rynop)\
**Post date:** [December 5, 2016, 10:03pm UTC](https://forum.developer.roku.com/t/ability-to-specify-poster-image-height-only/6691/1 "2016-12-05T22:03:53Z")

</div>

I have a screen graph app, and I want to display a logo where I want to only specify the height and let the roku compute the width preserving aspect ratio.

How can I do this? According to the docs I figured this would work but it is not:

```auto
<Poster
    id="headerLogo"
    uri="pkg:/images/header-logo.png"
    loadHeight="80"
    loadDisplayMode="scaleToFill"
/>

```

---

<div class="post-metadata">

**Author:** ![joetesta](https://avatars.discourse-cdn.com/v4/letter/j/85e7bf/32.png) [@joetesta](https://forum.developer.roku.com/u/joetesta)\
**Post date:** [December 6, 2016, 10:07pm UTC](https://forum.developer.roku.com/t/ability-to-specify-poster-image-height-only/6691/2 "2016-12-06T22:07:59Z")

</div>

Did you try without “scaleToFill” ?

> distorting the image if the target screen element area has a different aspect ratio than the image

Try removing that or try some of the other “loadDisplayMode” options

---

<div class="post-metadata">

**Author:** ![rynop](https://avatars.discourse-cdn.com/v4/letter/r/e480ec/32.png) [@rynop](https://forum.developer.roku.com/u/rynop)\
**Post date:** [December 6, 2016, 10:18pm UTC](https://forum.developer.roku.com/t/ability-to-specify-poster-image-height-only/6691/3 "2016-12-06T22:18:01Z")

</div>

I ended up doing this:

```auto
<Poster
 loadHeight="80"
 loadWidth="960"
 loadDisplayMode="scaleToFit"
 uri="pkg:/images/header-logo.png"
        />

```

I had to add a loadWidth, not sure why as it is totally ignored. Seems like a hack.

---

<div class="post-metadata">

**Author:** ![neoRiley](https://avatars.discourse-cdn.com/v4/letter/n/ee59a6/32.png) [@neoRiley](https://forum.developer.roku.com/u/neoRiley)\
**Post date:** [March 10, 2017, 5:00pm UTC](https://forum.developer.roku.com/t/ability-to-specify-poster-image-height-only/6691/4 "2017-03-10T17:00:13Z")

</div>

> “rynop” wrote:  
> I ended up doing this:
> 
> ```auto
> 
> ```

This magically worked for me as well. If the docs are telling the truth, then this is definitely a hack. It states very clearly “maintains aspect ratio”, so that would indicate that width or heights counterpart does NOT need to be set. But setting it makes it work… 🙂
