Images on assets are not loaded when in --release/prod mode

Hi guys,

Anyone could tell me why images on assets are not loaded when I run the app on Android device using release or prod command option?

As an example I have this simple list:
Running in debug mode:

ionic cordova run android -l -c --minifyjs --minifycss

Running in release/prod mode:
ionic cordova run android --release --minifyjs --minifycss


<ion-avatar item-start>
  <img src="../assets/img/group-icon.png" />

Any thoughts?


at debugging in chrome you have 2 folders that containing your images, etc…, src, where your code exist, and www folder, where ionic serve copy that what should served. So you need your paths pointing from index file in your www folder to your whatever, because this are the resulting files and folders.

In this case it should be 'assets/… maybe

Best regards, anna-liebt

Just found the solution, it’s simpler than it looks:

<ion-avatar item-start>
  <img src="./assets/img/group-icon.png" />

Use just 1 dot for the src of the image.