Image issue with ionic cordova run android

Static Image Path I have kept in provider so I m calling provider function in my page.ts but when I run command ““ionic cordova run android”” that image wont display in my android but in web it will display and if I run the command with
"“ionic cordova run android -l -s -c”" it will display
why this difference is there and what difference not getting

Show us some code.

  1. An example of how you embed an image.
  2. The provider you mentioned.

in my providers path-file.ts file I have given path is like below

this.logo = "../assets/icon/logo.png";

from my home-page.ts I am like below

 this.image = provider.getLogo();

and in home.html i am displaying that image

<img src = "{{image}}" >

And the code of [quote=“Nikhil_dhar123, post:3, topic:94135”]
[/quote] looks how?

public getLogo() {
    return this.logo;

public getLogo() {
return this.logo;

OK, so test these three and tell us if the image loads or not:

  1. ionic serve
  2. ionic cordova run android
  3. ionic cordova run android -l -s -c

yes I just checked last one is not loading

Did you remote debug the problem on the device already? Follow these instructions here to debug the problem in Chrome dev tools: Look at the console and network tabs for errors.

Check if the URL it is loading is different, if the path of the files is different or anything.

ohh so sorry not last one its second one and I have checked path in web also its correct and displaying also but issue is when I run with ionic cordova run android

Yes, then remote debug this with the link I just posted.

that link is for web and I am running in emulator :sweat:

Actually I don’t know how to debug in emulator I will have to search once

You are not reading what is on that page. It is not for web.

hey If I am not wrong I think this is where I have to look in your above link

but as instructions given for windows 7 5th step is not like as in my PC there is no device name there is only PCI ports

I thought relative paths for assets were frowned upon.

they are working fine in web but in emulator nothing…

yeah well, probably because this is not the right way to include assets. with remote debugging you will see this yourself and be able to just test different URLs.

hi still not getting anything and 1 more thing is there if i use below command

ionic cordova run android -l -s -c

sqlite problem occurs it will show cordova_not_avilable command with

ionic cordova run android 

works fine but image path issue

May be, but this is unrelated to the Image issue you have to solve first. Please open a new thread for the sqlite problem.