# Problem with background image in apk

**URL:** <https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883>\
**Category:** ionic-v3\
**Created:** [November 21, 2017, 12:30pm UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883 "2017-11-21T12:30:01Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![JEricaM](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@JEricaM](https://forum.ionicframework.com/u/JEricaM)\
**Post date:** [November 21, 2017, 12:30pm UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883/1 "2017-11-21T12:30:01Z")

</div>

I’m my html page I have a ion-content with the class **getstart** , with a background image, placed in **assets/img**.  
It works perfectly into the web browser, but wen I test the app with the apk, the background remains white.

I know that It’s a recurrent question, but all the answers that I found (in this forum or other sites) don’t work for me.

This is my scss code, placed inside **app.scss**

```auto
  .getstart{
    background: url('../assets/img/venice.jpg') no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    background-size: cover;

  }

```

I tryied changing che image url like ‘ **/assets/img/venice.jpg** ’ , but nothing worked.

I’m really stuck ☹  
Thank you in advance!

---

<div class="post-metadata">

**Author:** ![temohpab](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@temohpab](https://forum.ionicframework.com/u/temohpab)\
**Post date:** [November 21, 2017, 12:33pm UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883/2 "2017-11-21T12:33:09Z")

</div>

try in html:

````auto
<img alt="logoID" src="assets/img/logoHighTrans.png">```
````

---

<div class="post-metadata">

**Author:** ![JEricaM](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@JEricaM](https://forum.ionicframework.com/u/JEricaM)\
**Post date:** [November 21, 2017, 12:34pm UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883/3 "2017-11-21T12:34:43Z")

</div>

why in html? I need to set the background with css…-

---

<div class="post-metadata">

**Author:** ![temohpab](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@temohpab](https://forum.ionicframework.com/u/temohpab)\
**Post date:** [November 21, 2017, 12:37pm UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883/4 "2017-11-21T12:37:02Z")

</div>

You can set a div on that img tag with a class and then realise the changes in css…

---

<div class="post-metadata">

**Author:** ![JEricaM](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@JEricaM](https://forum.ionicframework.com/u/JEricaM)\
**Post date:** [November 21, 2017, 1:11pm UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883/5 "2017-11-21T13:11:51Z")

</div>

sorry but I don’t understand you advice. what changes? what div?

---

<div class="post-metadata">

**Author:** ![temohpab](https://avatars.discourse-cdn.com/v4/letter/t/f0a364/32.png) [@temohpab](https://forum.ionicframework.com/u/temohpab)\
**Post date:** [November 21, 2017, 1:48pm UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883/6 "2017-11-21T13:48:39Z")

</div>

For example…

```auto
<div class="logo">
     <img alt="logoImage" src="assets/img/logoHighTrans.png">
</div>

In css:

  .logo{
    padding: 5px 0;
    min-height: 200px;
    text-align: center;
  }

  .logo img{
    padding-top: 15px;
    max-width: 180px;

    animation:fade 3000ms infinite;
    -webkit-animation:fade 3000ms infinite;

  }

```

For example…

---

<div class="post-metadata">

**Author:** ![ChrisGriiffith](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/chrisgriiffith/32/66576_2.png) [@ChrisGriiffith](https://forum.ionicframework.com/u/ChrisGriiffith)\
**Post date:** [November 21, 2017, 10:02pm UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883/7 "2017-11-21T22:02:45Z")

</div>

Use Chrome’s remote debugging function. Once your apk is running, tunnel into your app using it. Then you can inspect the CSS and explore live adjustments. Whenever I have a pathing issue, that is typically how I resolve it.

Have you tried ‘./assets/img/venice.jpg’ ?

---

<div class="post-metadata">

**Author:** ![JEricaM](https://avatars.discourse-cdn.com/v4/letter/j/b77776/32.png) [@JEricaM](https://forum.ionicframework.com/u/JEricaM)\
**Post date:** [November 22, 2017, 9:59am UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883/8 "2017-11-22T09:59:43Z")

</div>

I solves this, it was a silly mistake. I didn’t know that the apk it’s case sensitive. My image was a .JPG and in the url I write .jpg so the apk did not recognize any image.

Thank you for the help!

---

<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, 10:02pm UTC](https://forum.ionicframework.com/t/problem-with-background-image-in-apk/112883/9 "2021-07-19T22:02:38Z")

</div>

Closed on July 19, 2021, 10:02pm UTC


