2 Replies Latest reply on Sep 7, 2018 2:40 PM by offimedicasMobile

    Web Images Not Showing on PhoneGap app

    samera62184639 Level 1

      I am new to PhoneGap. My local images show fine on the App  (iOS 10.2), but all web images are not showing (they do show on the web browser, not on the app). everything I read on the internet was pointing at the Whitelist, but I have made all possible changes to it and still no luck.


      <access origin="*"/>
      <!-- Added the following intents to support the removal of whitelist code from base cordova to a plugin -->
      <!-- Whitelist configuration. Refer to https://cordova.apache.org/docs/en/edge/guide_appdev_whitelist_index.md.html -->
      <plugin name="cordova-plugin-whitelist" version="1" />

      <allow-intent href="http://*/*" />

      <allow-intent href="https://*/*" />

      <allow-intent href="tel:*" />

      <allow-intent href="sms:*" />

      <allow-intent href="mailto:*" />

      <allow-intent href="geo:*" />

      <platform name="android">

         <allow-intent href="market:*" />


      <platform name="ios">

         <allow-intent href="itms:*" />

         <allow-intent href="itms-apps:*" />




      Please help!

        • 1. Re: Web Images Not Showing on PhoneGap app
          VectorP Level 4

          <plugin name="cordova-plugin-whitelist" version="1" />

          For starters, this version doesn't exist.


          Secondly, you only allow for intents. It would be a good idea to read the whitelist plugin's documentation and apply it, especially the allow-navigation whitelist rule. And check your CSP, too!

          Should you get the images from an ajax request to a web service, look into the access origin whitelist rule (not sure why it's colored grey in your original question). In that case, make sure you wait for the deviceready event before making the request!

          • 2. Re: Web Images Not Showing on PhoneGap app

            The routes of the images must be absolute. I usually have them in a folder in the root "img" and the pages in another "pages", from the code I call them <img src = "img/my_image.svg">