Nativescript: Image view not loading images

Created on 28 Mar 2017  路  4Comments  路  Source: NativeScript/NativeScript

I tried to use the image view and It would not load some images over http.

This one works
<Image src="https://www.google.com/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png"></Image>

But this one does not work.
<Image src="http://civilizedcavemancooking.com/wp-content/uploads/2015/01/Paleo-Chicken-Soup.jpg"></Image>

question

Most helpful comment

Hi @praven07,
Can you provide more info about the platform, where you have this issue?
Regard that by default iOS is not allowing requests via HTTP but only via HTTPS. To allow this option you could add NSAllowsArbitraryLoads key to true in your Info.plist file.

<key>NSAppTransportSecurity</key>
<dict>
  <!--Include to allow all connections (DANGER)-->
  <key>NSAllowsArbitraryLoads</key>
      <true/>
</dict>

All 4 comments

Hi @praven07,
Can you provide more info about the platform, where you have this issue?
Regard that by default iOS is not allowing requests via HTTP but only via HTTPS. To allow this option you could add NSAllowsArbitraryLoads key to true in your Info.plist file.

<key>NSAppTransportSecurity</key>
<dict>
  <!--Include to allow all connections (DANGER)-->
  <key>NSAllowsArbitraryLoads</key>
      <true/>
</dict>

@praven07 sample project demonstrating the load of the exact same image can be found here (along with the solution provided by @tsonevn for NSAllowsArbitaryLoads in info.plist file)

Thanks! I got it working!

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Leo-lay picture Leo-lay  路  3Comments

dhanalakshmitawwa picture dhanalakshmitawwa  路  3Comments

valentinstoychev picture valentinstoychev  路  3Comments

kn9ts picture kn9ts  路  3Comments

minjunlan picture minjunlan  路  3Comments