SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    732
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    images not displaying live (yes i uploded it :-) )

    All right!
    I can get the images to display on my pages on the sandbox using the code

    Code:
    <img class="pull-left" src="<?php echo get_stylesheet_directory_uri(); ?>../coreImg/coreLogo100x100px.png"/>
    hower once the site is live the images no longer display (yes I checked, they are there). My test site is at http://thebigmeow.us/

    and also and I google this first as well I can't get the background images to display at all, sandbox or live. And of course the code I tried was:
    Code:
    #mainBox{
    background-image:url('../coreImg/mainOilTnkr.png');
    background-image:url('/wp-content/themes/cdiDlm/coreImg/mainOilTnkr.png');
    border:2px solid #000;
    }
    I added the border to see if it would show up. It does. the images don't, w/either one of the tags.

    Am using root retlehs. I have attached an image of what I get as well. Anyone has run across this problem & solved it please?
    wpMissingImages.jpg

    Thank you all.
    D

  2. #2
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    732
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    partial solution

    Passing this along in case it helps anyone else: Nick Fox from the google roots group provided the information on how to fix the missing images. In part.
    "
    Nick Fox nick@foxaii.com via googlegroups.com
    5:30 PM (27 minutes ago)

    to roots-theme
    Put the images into /assets/img within the theme folder. You can then link to them like so:
    Code:
    <img class="pull-left" src="/assets/img/coreLogo100x100px.png"/>
    Applying this to your other thread:
    Code:
    .content .row{
    background-image: url('/assets/imgmainOilTnkr.png');
    }
    "

    the fist part worked, when it came to placing the image on page. The flip side is that the same code doesn't work on the sandbox. And the background image is still not displaying.

  3. #3
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,820
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    1. If the path to the image is being generated from PHP then view the source of the page to see what the resultant path ends up being to see if it is what you expected when you uploaded the images.

    2. For background images referenced from the CSS the path needs to be relative to the HTML file location.

    3. Check any capitalization in file names. Windows is not case sensitive but most web servers run Linux which is case sensitive.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  4. #4
    SitePoint Guru
    Join Date
    Oct 2010
    Location
    Portland, Or
    Posts
    732
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Thanks stephen will take a look at all of that. I think partially is the root theme that has a diff set and it is complicating things.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •