Set an image as background in ion-slide
background-image, ionic2, slide
Solution
Your background image path is incorrect.
The image should be saved in `/src/assets/img/fondo.png`. This is copied to `/www/assets/img/fondo.png` during the build process.
Your html code will have :
<ion-slide style="background-image: url(../assets/img/fondo.png)">
Problem
I am trying to do an intro for an app with < ion-slides page>, my problem comes to set an image as background, I am trying to do this on my HTML: ``` <ion-header> <ion-navbar> <ion-title>Intro</ion-title> </ion-navbar> </ion-header> <ion-content padding> </ion-content> <ion-slides pager> <ion-slide style="background-image: url(/../../www/img/fondo.png)"> <h2>Slide 1</h2> </ion-slide> <ion-slide style="background-color: mediumpurple"> <h2>Slide 2</h2> </ion-slide> <ion-slide style="background-color: mediumpurple"> <h2>Slide 3</h2> </ion-slide> </ion-slides> ``` As it can be seen, the first slide should show the image, but what I get is this: Thanks for helping!