Images from image tag not loading in iOS emulator


nice workaround! Worked for me! I was facing this problem


Is there anyone who solved image load problem from a web url?


It’s confusing that when you have root relative paths like /img/blah.jpg it works just fine in the Ionic View app but not in native iOS apps.


Same for me. With Android (real dive) and browser simulator, everything is ok.


I had it like this: background: url(’/…/img/bg.jpg’);

Changed it to: background: url(’…/img/bg.jpg’);

And it worked. So the backslash before the dot was the problem.


If you need your images to work cross-platform. Using content: url() worked best for me.

First copy your image into your working directory.


Then set your <img> location in your template.

<!-- home.html -->

  <img class="logo">

Then reference your image from you asset directory from your scss.

// home.scss

.logo {
  content: url('../assets/img/logo.png');

This was tested with iOS and Web.


Thank you so much :slight_smile:


Also had this problem. I used the default img path so


What worked cross platform for me was this (from the .ts file).

this.postHeaderURL = 'assets/img/imgName.jpg';