background-image CSS property: how to do it right with Craft?
There is a function called alias that returns a defined alias. A default alias is @web and it represents your base url,

background-image: {{ alias('@web') }}/path/to/image.jpg;


Would display the file image.jpg in web/path/to/