Logo image not showing on Android and IOS


#1

Hello,

I’m trying to place an image in the header of our app and it shows on localhost but not in Android and IOS emulator.

<ion-view title='<img class="logo" src="../img/USAID-Logo-iPhone5s.png">' id="header">

I even tried:

<ion-view title='<img class="logo" src="/img/USAID-Logo-iPhone5s.png">' id="header">

and:

<ion-view title='<img class="logo" src="img/USAID-Logo-iPhone5s.png">' id="header">

Still no luck with IOS and Android but worked fine locally.

Localhost:

IOS:

Android:

What am I missing? I tried multiple paths but no luck.


#2

I’ve resolved it by looking up this: https://groups.google.com/forum/#!topic/phonegap/wSvlK8Em2HQ

I simply needed to change the path to: “./img/USAID-Logo-iPhone5s.png”


#3

Yup, paths for images need to be relative to the index.html page.