# Ion-toolbar background-image Ionic 4

**URL:** <https://forum.ionicframework.com/t/ion-toolbar-background-image-ionic-4/135891>\
**Category:** ionic-v3\
**Created:** [July 22, 2018, 4:39pm UTC](https://forum.ionicframework.com/t/ion-toolbar-background-image-ionic-4/135891 "2018-07-22T16:39:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![shepard](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@shepard](https://forum.ionicframework.com/u/shepard)\
**Post date:** [July 22, 2018, 4:39pm UTC](https://forum.ionicframework.com/t/ion-toolbar-background-image-ionic-4/135891/1 "2018-07-22T16:39:50Z")

</div>

Using .toolbar-background no longer seems to work in Ionic 4.

How does the background image get set now?

```auto
.toolbar-background {
    background-image: url('assets/images/myimage.jpg');
}

```

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [July 22, 2018, 7:52pm UTC](https://forum.ionicframework.com/t/ion-toolbar-background-image-ionic-4/135891/2 "2018-07-22T19:52:39Z")

</div>

yep `.toolbar-background` doesn’t exist anymore I think in Ionic v4

because of shadow-root a lot of styling may change if you were, like me, relied on style classes

you will probably have to set a css4 variables to solve this, like

```
 ion-toolbar {
    --background: url('assets/images/myimage.jpg') no-repeat fixed center; 
 }

```

something like that

---

<div class="post-metadata">

**Author:** ![shepard](https://avatars.discourse-cdn.com/v4/letter/s/f14d63/32.png) [@shepard](https://forum.ionicframework.com/u/shepard)\
**Post date:** [July 23, 2018, 2:09pm UTC](https://forum.ionicframework.com/t/ion-toolbar-background-image-ionic-4/135891/3 "2018-07-23T14:09:01Z")

</div>

Thanks - that worked!

---

<div class="post-metadata">

**Author:** ![reedrichards](https://avatars.discourse-cdn.com/v4/letter/r/34f0e0/32.png) [@reedrichards](https://forum.ionicframework.com/u/reedrichards)\
**Post date:** [July 23, 2018, 2:20pm UTC](https://forum.ionicframework.com/t/ion-toolbar-background-image-ionic-4/135891/4 "2018-07-23T14:20:22Z")

</div>

> [@shepard](#):
>
> Thanks - that worked!

coolio 🙂

---

<div class="post-metadata">

**Author:** ![mhartington](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/mhartington/32/137757_2.png) [@mhartington](https://forum.ionicframework.com/u/mhartington)\
**Post date:** [July 19, 2021, 9:29pm UTC](https://forum.ionicframework.com/t/ion-toolbar-background-image-ionic-4/135891/5 "2021-07-19T21:29:03Z")

</div>

Closed on July 19, 2021, 9:29pm UTC


