This is a migrated thread and some comments may be shown as answers.

How to load image from external url?

3 Answers 860 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Dejan Mauer
Top achievements
Rank 1
Dejan Mauer asked on 16 Nov 2012, 07:39 PM
There is difference between simulator and device deployed application (in my case Android).

In my code, I need to load image from internet (example: http://www.domain.com/image.jpg).

<image src='example: http://www.domain.com/image.jpg' />

However, the image is shown in emulator, but on the device it shows broken link. I have read Cordova implements whitelist Cordova.plist for domains, but I do not know if it can be implemented within Icenium.

I would like to get advice on how to display image from internet source inside <image> tag.

Is this possible?


3 Answers, 1 is accepted

Sort by
0
Jan-Dirk
Top achievements
Rank 1
answered on 19 Nov 2012, 09:02 AM
embedding images should work, my app does it all the time. However, I see in your example that you have the word 'example' just before the url.

This is what should work (if an image exists on the url):
<image src='http://www.domain.com/image.jpg' />

Good luck!
0
Dejan Mauer
Top achievements
Rank 1
answered on 19 Dec 2012, 01:23 PM
It works now... I still don't know what was the issue. 
Thank you.
0
Jan-Dirk
Top achievements
Rank 1
answered on 19 Dec 2012, 04:53 PM
Maybe you were on 3G at the time you did't see the picture? I have noticed that when my phone falls back from HSDPA to 3G I get a lousy bandwidth experience.
Tags
General Discussion
Asked by
Dejan Mauer
Top achievements
Rank 1
Answers by
Jan-Dirk
Top achievements
Rank 1
Dejan Mauer
Top achievements
Rank 1
Share this question
or