Images included in custom CSS do not appear on my blog

  • Unknown's avatar

    Hi,

    I am trying to use a custom design template on my blog, and it includes some images stored in the template’s /image directory.

    I have uploaded the images to the Media Library and changed the image urls in the CSS accordingly: ‘/files/YEAR/MONTH/image.jpg’
    Then I paste the css file into the CSS Stylesheet Editor and try Preview. Everything works perfectly. But when I save the stylesheet and refresh my blog to see how it works, the images are missing out. I have tried this with a couple of custom templates and it is always the same problem, the images are missing out.

    I have no idea where the problem is – can somebody help me please?

    Thank you very much.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    If this is what you are putting in the CSS, /files/YEAR/MONTH/image.jpg , they you are using relative URL’s. You need to use absolute URL’s (full URL starting with http:// for it to work. Relative URL’s only work when you can control where the CSS file is saved, and with a wordpress.COM blog, you cannot control that.

  • Unknown's avatar

    Thank you very much! It’s working perfectly now.

  • Unknown's avatar
  • The topic ‘Images included in custom CSS do not appear on my blog’ is closed to new replies.