More in this section
Forums / General Discussions / Referencing an image from a gallery in CSS

Referencing an image from a gallery in CSS

The forums are in read-only mode. In case that you want to directly contact the Progress Sitefinity team use the support center. In our Google Plus group you can find more than one thousand Sitefinity developers discussing different topics. For the Stack Overflow threads don’t forget to use the “Sitefinity” tag.
5 posts, 0 answered
  1. G S S
    G S S avatar
    71 posts
    16 Mar 2008
    17 Feb 2011
    Link to this post

    I've uploaded an image to an image gallery in Sitefinity 4. I want to use it as a background-image of the body in the page and reference the image, like so:

    background-image: url('metal_texture_7_by_wojtar_stock.jpg);

    However, the background-image does not appear on the page. How can I reference the image successfully?
  2. Steve
    Steve avatar
    3037 posts
    03 Dec 2008
    17 Feb 2011
    Link to this post
    Isn't there an embed link somewhere you can copy\paste in the gallery which would work?  I know the Documents library has that...
  3. Katia
    Katia avatar
    194 posts
    01 Jul 2016
    18 Feb 2011
    Link to this post
    Hi Steve,

    You need to write the absolute path of the image. You can check it as you go to Images module and click on "Embed this image" link of the particular image. From Link field you can copy the absolute path.

    the Telerik team
  4. Eric
    Eric avatar
    1 posts
    19 Aug 2015
    03 Feb 2016
    Link to this post
    This is the approach I used, however, this does not seem to be a good solution for those of us using site-sync.  Could you tell me how to solve this under a staging / production scenario?
  5. Svetoslav Manchev
    Svetoslav Manchev avatar
    735 posts
    06 Sep 2017
    08 Feb 2016
    Link to this post
    Hello Eric,

    Can you please try to use only the relative part of the image in your code, e.g.

    Svetoslav Manchev
    Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Sitefinity CMS Ideas&Feedback Portal and vote to affect the priority of the items
5 posts, 0 answered