I’m trying to display a background-image in my Ionic app and I’ve tried all the paths that I could imagine but that doesn’t work… I found some topics on this subject but these were unefficient…
I have my picture in:
Your url seems to be correct. Make sure you are applying this syle to correct element which should be <ion-content>.
Try giving background color and check if the changes reflect!
PS: There could be one more reason: src folder content might not have been copied to www folder so make sure you run ionic cordova build and not only cordova build
Thank you for your reply, but I do not want to display the image to the whole ion-content but just to a div in my ion-content. This is the result I want to have on my phone (it works in the emulator):
As you can see, ion-content already have a background-color!
Is ion-content the only element where I can apply image-background?
For your PS: I ran ionic cordova build android and I’m quite sure the folder has been copied because it display an element and the source image is in the same folder as these background-images!