How to add image as background using url function in a document template

0
Hello, I need to add a background image via the style section of a template document. The image is located in the web folder of my deployment directory but I don't know how to access it using the url function... I tried: background-image:url('web\splash.jpg'), background-image:url('.\splash.jpg'), background-image:url('images\splash.jpg'), , background-image:url('resources\splash.jpg')... but I still get the error: "Image not found. URI: splash.jpg. (See position -1:-1)" Do you know what is the correct syntax to get my image? Thanks in advance
asked
5 answers
0

nobody knows how to get an image in the style section in a template document?

just for info, the only way working for me is by harciding the complete path of the image:

background-image:'file:///E:\Temp\splash.jpg';

But I need to have a relative path with the image stored in my project directory...

Do you know how?

 

answered
0

Nobody knows???

If it's not possible, could you tell me too?

answered
0

It looks like you are using the wrong direction for the slash. Try swapping \ (back slash) to / (forward slash). For example, "/splash.jpg".

answered
0

I also the same think: draft.jpg in my theme folder...

and the custom style I use:

image.png

 

content of my deployment directory:

 

image.png

 

result...

image.png

 

I don't understand

It works in a normal web page but when I use the template document generation, it doesn't work...

answered
0

You did not read Roberts reply correctly. Place it in your theme folder instead of your deployment folder. Because the deployment folder is being build up everytime you deploy and is based on your theme folder. So anything you place directly in the deployment folder is gone after a redeploy and replaced with the stuff from your theme folder. 

Regards,

Ronald

 

answered