Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nicky Christensen 19 posts 40 karma points
    Dec 03, 2009 @ 10:02
    Nicky Christensen
    0

    How do I access images in css to images in Media folder?

    I've uploadet X images to a folder in my media library...

    But cant access them? The path is ex: like: Media/images/rss.gif

    But when accesing the URL, it dont exist?

    So what do i do when i've have my css that is??:

    #rss { background: transparent url(/media/images/rss.gif) left top no-repeat;

  • Dan 1288 posts 3921 karma points c-trib
    Dec 03, 2009 @ 10:30
    Dan
    0

    Have you tried absolute URLs?

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Dec 03, 2009 @ 10:44
    Thomas Höhler
    0

    Did you upload them into the media library so that they are accessible via umbraco backend media section? If so the item will give you the correct url and this has to be like /media/12345/rss.gif where 12345 the ID of the media property is. otherwise you have uploaded it via FTP not to be accessible via umbraco backend the issue can be of security settings of the files.

    hth, Thomas

  • Nicky Christensen 19 posts 40 karma points
    Dec 03, 2009 @ 11:02
    Nicky Christensen
    0

    Yeah i uploaded them to the Media library...

    So does this mean i can't get the structure without using the id's fo the folders im creating? I cant use the names of the folders that i am creating?

    So the only way to do what i want is to make a folder in the root of the umbraco installation called images and place my images here?

  • Chriztian Steinmeier 2800 posts 8790 karma points MVP 8x admin c-trib
    Dec 03, 2009 @ 11:14
    Chriztian Steinmeier
    0

    Hi Nicky,

    Yes - put them in your own folder; Images exclusive to the design (i.e., images you reference in the stylesheets) normally shouldn't go into the Media section (unless you really want your client to be able to modify/specify some of them, in which case I'd recommend not referenceing those in CSS, but then use the GetMedia() function in your XSLT for those items.)

    /Chriztian 

  • Thomas Höhler 1237 posts 1709 karma points MVP
    Dec 03, 2009 @ 11:20
    Thomas Höhler
    0

    @Chriztian: agree

    You can also place an images folder in the media folder, this won't be touched by umbraco, cause in standard mode umbraco will create a new folder with the 12345 id for each new media item (with a file) you create. But for me best practice seems to be to place this folder into the root.

    Thomas

  • Fredrik 41 posts 161 karma points
    Dec 03, 2009 @ 11:33
    Fredrik
    0

    Sounds like something is wrong Nicky. I got the same setup with a folder called layout inside the mediafolder on server. ex. /media/layout/header.gif
    I also use the same code as you, and it works flawless here.

    Regards,
    Fredrik

  • Ben 1 post 21 karma points
    Feb 04, 2010 @ 19:33
    Ben
    0

    Fredrik -

     

    It would be best if we could upload images to folders inside of the Stylesheets folder for layout and background tasks.Outside of the media area. Currently this works but not thruogh the Umbraco UI. This leaves the editing of stylesheets online lacking.

    e.g.

    background: #ffffff url('layout/bg_main.gif') top center repeat-y;

Please Sign in or register to post replies

Write your reply to:

Draft