Images not displayed in Android build


I have a problem with my Ionic application, I have images in tags in my html view, they are correctly displayed if I make a “ionic serve”, but when I make “ionic run android” they are not displayed on my android device.

If i choose to launch it with LiveReload with 'ionic run android -l", it works …

Is somebody have the same issue ? Is there particular permissions to change ?

For information I’m developping on windows 8, serving with chrome, and my device is Android 6.0. All my libraries are up to date (ionic & android sdk).

Have you tried removing the forward slash from the image src?
<img src="img/image.png" />
instead of
<img src="/img/image.png" />

@MicCode, what are the src ouf your images? If they are external images, you also have to include http:// or https:// and not just // as this translates to file:// on the device.

@anothergituser Yes, this is exactly what I’ve done, there is no slash in the adress.
My code : <img src="img/myImage.png"/>

@Sujan12 The image is included directly in the img folder of my project, and is served normally on the computer, but not in the android build …


Connect your Android device to your PC and use Chrome to debug directly in your app: Look at the img tags and network activity, also all the error messages in the console.

Alternatively look at what error messages you can see in the Android Device Monitor (e.g. using Android Studio).