1
0
-1

How do you use an image component property as a background image on a block within the shared component?

    CommentAdd your comment...

    2 answers

    1.  
      1
      0
      -1

      Hi Tim,

      How do I use a component property for the image so that I can drive it from a brand option?

      My use case is that I have a hero image in a header shared component and want to be able to swap out the hero image per brand.

      Thanks,

      Ben

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Select the block within the component editor. In the styles panel, open the Background category and choose Image. Select the image you want. Then save this as a shared style.

        When you publish the component, the shared style (and image, if you uploaded a new one) get published too.

        Now use that component in a form, and it has the background image.

          CommentAdd your comment...