After doing some research, I unfortunately do not have the necessary setup to test it out myself. Therefore, I recommend that you try it out for yourself.
Here is a suggested code snippet for you to test:
.header-task{
background-image: url("static(image/nightlandscape.jpg"));
background-repeat: no-repeat;
background-size: 100% 200%;
height: 120px;
position: relative;
}
If your STATIC_URL is '/static/' (usually found in settings.py), the rendered code will look like this:
.header-task{
background-image: url("/static/image/nightlandscape.jpg");
background-repeat: no-repeat;
background-size: 100% 200%;
height: 120px;
position: relative;
}
Alternatively, you can try this code snippet:
.header-task{
background-image: url('{% static 'nightlandscape.jpg' %}') or url('{% static "/img/nightlandscape.jpg" %}')
background-repeat: no-repeat;
background-size: 100% 200%;
height: 120px;
position: relative;
}
For this snippet, make sure to load static files first by including {% load static%}
in your HTML
file before loading the stylesheet.
<head>
<style>
{% include "path/to/my_styles.css" %}
</style>
</head>
You could also try simply changing
url("..\image\nightlandscape.jpg")
to
url("../image/nightlandscape.jpg")