Image don't show on devices

hi, i have my api when a make a http request in the browser everything works well, but on the devices android image dont’show!!! any help please?

What is the code you use to include images?
Does it work in ionic serve?

with ionic serve it work, not in the device

    <button ion-item *ngFor="let data of reponse"  >
      <ion-thumbnail item-start>
        <img [src]="" />

What is the value of

Are these local pictures or from remote locations?

photo is the column in my api, pictures are on aws s3

Then check your devices console log for output:

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

no error when i debug

This is not possible, otherwise it would show the image (or you don’t actually try to load the picture there).

I had the same issue : Here’s what fixed it :

Change your image paths from ‘…/assets/images/someimg.jpg’ to 'assets/images/someimg.jpg’
The reason this works is because index.html is the file that runs the app, so your image paths need to be relative to index.html.

Your images were stored locally not remotely.
Because they exist in your assets

1 Like

Oh right, missed the part where he said his pictures were on aws s3. My bad

Any Idea ? I don’t find any error when debuging

No errors, like i told you !!!

Maybe you place the photo in the wrong path??

try to put the photo in www/assets/img/img.png and then in code

<img class="classname " src="assets/img/img.png"/>

So you are telling me that 1) the images are showing in the browser when using ionic serve but 2) they are not showing when testing on Android after building with ionic cordova build android and 3) you are not getting any network or console output that looks like an error? That is pretty much impossible.

If it is a security problem, the network panel will show something with the HTTP request.
If it is a wrong/broken URL, same.
If it is a HTML/JS problem, you will get something in the console.

This happen to me one time… I fix it like i mentioned above

Yes but as written multiple times above he is not talking about a local file in assets.

If it is a remote connection, does the async pipe need to be used, as it does when connecting with Firebase?

<button ion-item *ngFor="let data of response | async">

can i talk to you in private?

i’m using heroku hosting not firebase