0

I can show an image in HTML using this absolute path

file:///storage/sdcard0/Android/data/my.app.id/cache/myImage.jpg

as a src value.

As CSS's url property is relative to the location of the CSS file it of course won't know how to interpret the absolute path given above huh?

Is there a way to set the background url property to my given image?

Perhaps converting the given absolute path to relative path of my CSS somehow?

Similar question:

Any help appreciated

Community
  • 1
  • 1
trainoasis
  • 6,419
  • 12
  • 51
  • 82
  • Have you tried just placing the image in a folder inside your assets folder (that is, in a directory one level above where you keep your css in your project folder), and referencing it by "./myImage.jpg"? Unless there's more to it and that's not an option – Dan Jul 30 '14 at 17:27
  • There is more to it yeah - image is downloaded and I cannot download it to my project folder ... – trainoasis Jul 31 '14 at 06:08

0 Answers0