# Cannot bind background image via dynamic data from Contentful Integration

**URL:** <https://forum.builder.io/t/cannot-bind-background-image-via-dynamic-data-from-contentful-integration/2113>\
**Category:** Technical Questions\
**Tags:** bug\
**Created:** [May 5, 2022, 10:21pm UTC](https://forum.builder.io/t/cannot-bind-background-image-via-dynamic-data-from-contentful-integration/2113 "2022-05-05T22:21:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jayshay](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jayshay](https://forum.builder.io/u/jayshay)\
**Post date:** [May 5, 2022, 10:21pm UTC](https://forum.builder.io/t/cannot-bind-background-image-via-dynamic-data-from-contentful-integration/2113/1 "2022-05-05T22:21:19Z")

</div>

Hello,

Steps to reproduce:

1.) Add Contentful integration  
2.) Add image to Contentful  
3.) Try to apply to the dynamic, bound background of a box

There will not be a background image

---

<div class="post-metadata">

**Author:** ![jayshay](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jayshay](https://forum.builder.io/u/jayshay)\
**Post date:** [May 5, 2022, 10:46pm UTC](https://forum.builder.io/t/cannot-bind-background-image-via-dynamic-data-from-contentful-integration/2113/2 "2022-05-05T22:46:37Z")

</div>

Actually, we have tested with builder data and still doesn’t display.

 ![Screen Shot 2022-05-05 at 3.45.13 PM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/c/c51b6eb10553632d11caf0e9dba5e46fc4cfcec9.png)

---

<div class="post-metadata">

**Author:** ![TimG](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/timg/32/714_2.png) [@TimG](https://forum.builder.io/u/TimG)\
**Post date:** [May 6, 2022, 3:01pm UTC](https://forum.builder.io/t/cannot-bind-background-image-via-dynamic-data-from-contentful-integration/2113/3 "2022-05-06T15:01:52Z")

</div>

Hi @jayshay thank you for the question! Yes, setting the background image like that wont necessarily work, because `style.backgroundImage` sets the [backgroundImage CSS property](https://www.w3schools.com/cssref/pr_background-image.asp), which requires the syntax `url("whateverUrl.com")`

The way you have it set is just setting `backgroundImage: whateverUrl.com`, which is why it is not working.

In order to fix this, you simply need to set the `from` value to be custom code by selecting the `<>` button and entering in custom code in the syntax of the CSS property, something like

```auto
return `url(${state.article.image})`

```

Or whatever your case may be. See the image attached  
 ![Screen Shot 2022-05-06 at 11.00.13 AM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/2X/9/90766b228eb8147b1e69ba2300185ad65f7740dc.png)

Hope that helps!

---

<div class="post-metadata">

**Author:** ![jayshay](https://avatars.discourse-cdn.com/v4/letter/j/e47c2d/32.png) [@jayshay](https://forum.builder.io/u/jayshay)\
**Post date:** [May 6, 2022, 9:57pm UTC](https://forum.builder.io/t/cannot-bind-background-image-via-dynamic-data-from-contentful-integration/2113/4 "2022-05-06T21:57:59Z")

</div>

Hi Tim,

We tried your suggestion and it worked perfectly. Thanks for your prompt support with this!
