Ionic 3 background-image svg not appering in Ionic View

Viewed 1558

I'm developing an App using Ionic 2. Right now, I've this style:

ion-content {
  background-image: url('/assets/images/orange-background.svg');
  background-repeat: no-repeat;
  background-size: 101%;
}

When I ionic serve this works fine, but when I upload a new version to Ionic View channel, this example doesn't work neither any example of background-image with an .svg.

I already tried Ionic - svg does not appear but didn't work.

Thanks in advance.

Edit 1

I already tried this url in background-image:

assets/images/orange-background.svg
/assets/images/orange-background.svg
../assets/images/orange-background.svg
./assets/images/orange-background.svg

None of this worked :'(

Edit 2

I just discovered that this problem only happens on iOS.

2 Answers

Maybe the url is incorrect. In the .css files: url ('../assets/images/orange-background.svg').

In other case, did you make the difference: In Whindows an image.SVG will works when you test the app in a browser but wont in Linux (Also Android). It seems that an image.SVG is the same as image.svg in windows.

Related