Images disappear after build

1

I am developing an APP on Ionic 3, I put the images in the assets / img / imagem.png directory and when I run the Ionic Server in the lab, they appear normally, but when I build it and install it APK, all the images are gone, that is, they do not appear in the emulator or in the device.

    
asked by anonymous 20.10.2017 / 20:58

1 answer

1

The problem is relative path.

This works in the emulator:

<img src="../assets/img/teste.png">

So you should work on the device:

<img src="assets/img/teste.png">
    
21.10.2017 / 00:16