Images not loading in mobile

Thanks!!! :smiley: :smiley: :smiley: :smiley: :smiley:

my case is duplicate .png. The file double .png extend like this. file.png.png . Just remove one and it will work!
Thanks god!

Delete dist folder and re-compile.

Hi,

I am facing same issue with ionic 5.
my .scss file :
.bg-image{
โ€“background: url(โ€™/assets/img/bg2.pngโ€™) repeat center center fixed ;
โ€“background-size: cover;
}
.no-scroll .scroll-content {
overflow: hidden;
}
html :

I have tried different path combinations suggested in discussion. none of them works !
Please help, thanks in advance.
-Vanisree

hi,

did you manage to fix the issue ?

.bg-image{
โ€“background: url(/assets/bg.png) no-repeat center center fixed ;
background: url(/assets/bg.png) no-repeat center center fixed ;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size:cover;
}
this worked for me. No idea why is background and --background needed :slightly_smiling_face:

1 Like

Thanks, this worked for me too.

1 Like