# backgroundImage path in tailwind.config.js

**URL:** <https://discourse.roots.io/t/backgroundimage-path-in-tailwind-config-js/23132>\
**Category:** sage\
**Tags:** bedrock\
**Created:** [May 13, 2022, 10:49pm UTC](https://discourse.roots.io/t/backgroundimage-path-in-tailwind-config-js/23132 "2022-05-13T22:49:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mZoo](https://discourse.roots.io/user_avatar/discourse.roots.io/mzoo/32/1989_2.png) [@mZoo](https://discourse.roots.io/u/mZoo)\
**Post date:** [May 13, 2022, 10:49pm UTC](https://discourse.roots.io/t/backgroundimage-path-in-tailwind-config-js/23132/1 "2022-05-13T22:49:29Z")

</div>

I have an image located in `resources/images`, being compiled to `public_images`, and would like to use it in a background as part of my TailwindCSS theme definition, but am having trouble determining what the path should be:

```javascript
backgroundImage: {
  'hero-one': "url('/images/hero-one.jpg')",
  // /public/images
  // /resources/images
}

```

With frontend of `<div class="bg-hero-one">` generates:

```css
.bg-hero-one {
    background-image: url(http://example.test/images/hero-one.jpg);
}

```

But what I need, of course is to point to:

```nohighlight
http://example.test/app/themes/my-theme/public/images/hero-one.jpg

```

What am I missing?

---

<div class="post-metadata">

**Author:** ![mZoo](https://discourse.roots.io/user_avatar/discourse.roots.io/mzoo/32/1989_2.png) [@mZoo](https://discourse.roots.io/u/mZoo)\
**Post date:** [May 14, 2022, 11:22pm UTC](https://discourse.roots.io/t/backgroundimage-path-in-tailwind-config-js/23132/2 "2022-05-14T23:22:44Z")

</div>

The background image actually ended up being there in production. Not sure why it wasn’t, locally.

For my needs, I wanted a transparent overlay and got a better result with the method from this [10 minute YouTube video](https://www.youtube.com/watch?v=5UPdRF5xpVM).

```auto
<div class="-m-4 h-500 bg-gradient-to-tl from-purple-900 to-red-200">
  <img src="https://example.com/app/uploads/2022/05/Some.jpg" class="w-full h-full object-cover mix-blend-overlay absolute"/>
  <p> Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus non fringilla nisl. Curabitur ex turpis, pellentesque at viverra non, tempor ut turpis. Etiam id vehicula metus, eu porttitor magna. </p>
</div>

```
