No need to make it so complicated !!!
Here is the explanation :
When using the url() value, you have three choices:
- relative path based on the root domain of the CSS file — begin with a slash (/) as shown above
- relative path based on the immediate directory of the CSS file — no slash (url(path/to/image.png) )
- absolute URL, if you are linking to an external resource — url(http://example.com/path/to/image.png)
Source: https://html.com/attributes/body-background/
So basically, if you have your image in the folder image, next to to the foler styles (in which you css file might be), here is what you need to do :
background: url(../images/Chat.jpg)
../ means you go back one level above your current folder/workplace.
Here is what I used:
background: url(../images/Chat.jpg) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;