Use big image as background

I want to use an image that’s 3000x1000 and is about 300kb in size. The image is referenced from one of the .scss file using url(./assets/dec.jpg). I put the image as dec.jpg under www/assets/dec.jpg and made a build and deployed it to my android phone. The image isn’t taking effect. From chrome inspection, I see file://android_assets/www/assets but there is no dec.jpg, I also see file://android_assets/www/build/css/assets/ and I do see dec.jpg file there, but the file is empty.

What’s the correct way to reference image files in ionic 2? @mhartington Thanks.

from your .html use: ./
from .scss use: …/…/

1 Like

Thanks @fishgrind, that works on android. What about iOS, what’s the correct paths to use?

Had to rebuild app in xcode, the image nows shows in both ios and android.

1 Like