# How to use files from /assets in scss

**URL:** https://discourse.roots.io/t/how-to-use-files-from-assets-in-scss/8521
**Category:** sage
**Created:** 2017-01-10T21:36:25Z
**Posts:** 5
**Showing post:** 4 of 5

## Post 4 by @dangelion — 2020-11-12T16:06:31Z

Hi @ben  
I’m actually using the correct syntax but I get error

```
Module build failed: Error: resolve-url-loader: CSS error
  predicate must return an absolute path or the result of calling next()
```

More details here:

> [@Relative paths to images in CSS doesn't work anymore (ie. background-image path)](https://discourse.roots.io/t/relative-paths-to-images-in-css-doesnt-work-anymore-ie-background-image-path/19431/6):
>
> @alwaysblank There’s something real wrong here. I reinstalled Sage 9.0.10, fresh and clean via composer 1.7.2. Then yarn, yarn build and yarn start (I use node 10.22.1, just because reinstalling Sage it installed 9.0.10 that requires node 10. Anyway at the time I was writing first post I used Sage 9.0.9 with node 8.17 and I had same exact error). Put an image in resources/assets/images/bg.jpg. Add in resources/assets/styles/main.scss the line body { background-image: url(../images/bg.jpg); } (…

Any idea? I’m spending hours and hours not finding solution :frowning:

---

_[View the full topic](https://discourse.roots.io/t/how-to-use-files-from-assets-in-scss/8521)._
