We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 48729
    • 9 Posts
    This is a strange one as some images do display, yet the images near the top do not.

    This is a snippet of the page source on the live website which I am attempting to build on my localhost:

        if (document.images) {
            i1 = new Image(); i1.src = "http://www.pfitzpatrick.com//assets/templates/master/static/logo_main_reflect.png";
            i2 = new Image(); i2.src = "http://www.pfitzpatrick.com//assets/templates/master/static/logo_quarry_reflect.png";
            i3 = new Image(); i3.src = "http://www.pfitzpatrick.com//assets/templates/master/static/logo_asphalt_reflect.png";
            i4 = new Image(); i4.src = "http://www.pfitzpatrick.com//assets/templates/master/static/logo_recycle_reflect.png";
            t1 = new Image(); t1.src = "http://www.pfitzpatrick.com//assets/templates/master/static/title_welcome.png";
            t2 = new Image(); t2.src = "http://www.pfitzpatrick.com//assets/templates/master/static/title_quarry.png";
            t3 = new Image(); t3.src = "http://www.pfitzpatrick.com//assets/templates/master/static/title_asphalt.png";
            t4 = new Image(); t4.src = "http://www.pfitzpatrick.com//assets/templates/master/static/title_recycling.png";
        };
     


    I have each of those png files sitting in the correct directory being called. On the live website running the same files, it displays. However, on my localhost it does not.

    Here is how it looks to me:



    My file base path seems to point correctly to everything else, as the website looks close to the full thing, minus them images.

    Snippet of my configurations:



    Can anybody advise me on what could be causing them certain images to not display on the page.

    Thanks in advance. [ed. note: tony-ridge last edited this post 12 years, 1 month ago.]
      • 1343 ☆ A M B ☆
      • 2,213 Posts
      Remove the double slash before assets (//assets should become /assets). That should address the problem based on what i'm seeing.
        Patrick | Server Wrangler
        About Me: Website | Tweets |  MODX Hosting
        • 48729
        • 9 Posts
        Hey, thanks for the reply.

        The double slash works fine, that source is from the live site in which they display perfect. It is just on my localhost it is not displaying the images, is it possible that the i2, i3, i4, ti, t2, t3, t4 elements are contained in a CSS file and it is not being loaded into the page?
          • 48729
          • 9 Posts
          This is the code that should be displaying the images.

          <!DOCTYPE html>
          <html lang="en" id="http://localhost/scripts/modfreshupgrade/public_html/">
          <head>
              <meta charset="UTF-8">
              <script>
              // preload
              if (document.images) {
                  i1 = new Image(); i1.src = "http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/logo_main_reflect.png";
                  i2 = new Image(); i2.src = "http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/logo_quarry_reflect.png";
                  i3 = new Image(); i3.src = "http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/logo_asphalt_reflect.png";
                  i4 = new Image(); i4.src = "http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/logo_recycle_reflect.png";
                  t1 = new Image(); t1.src = "http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/title_welcome.png";
                  t2 = new Image(); t2.src = "http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/title_quarry.png";
                  t3 = new Image(); t3.src = "http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/title_asphalt.png";
                  t4 = new Image(); t4.src = "http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/title_recycling.png";
              };
              </script>
          <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'2fd814a0-ac16-4ee0-91cf-61ff7662e1be'});</script>
              <!--[if IE]><script src="http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/html5.js"></script><![endif]-->
              <!--[if lt IE 8]><link rel="stylesheet" href="http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/ie.css"><![endif]-->
              <link rel="stylesheet" href="http://localhost/scripts/modfreshupgrade/public_html//assets/templates/master/static/master.css">
              <title>Peter Fitzpatrick Ltd. Quarry Products, Asphalt Products, Construction Waste Recycling, Ireland, UK, Europe</title>
              <meta name="keywords" content="word, word, word" />
              <meta name="description" content="Established over 50 years ago, Peter Fitzpatrick Ltd have grown to become a market leader of Asphalt and Quarry products and Construction Waste Recycling services in Ireland, UK and Europe." />
              <link rel="shortcut icon" src="/favicon.ico" >
              <base href="http://localhost/scripts/modfreshupgrade/public_html/" />
              <script type="text/javascript">var _gaq = _gaq || [];_gaq.push(['_setAccount', 'UA-10797575-13']);_gaq.push(['_trackPageview']);(function() {var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);})();</script>
          <script src="http://localhost/scripts/modfreshupgrade/public_html/assets/js/jquery.min.js" type="text/javascript"></script>
                                      <link type="text/css" media="screen" rel="stylesheet" href="http://localhost/scripts/modfreshupgrade/public_html/assets/plugins/qm/css/colorbox.css" />
          


          I have the master.css file in place, but yet these images are not displaying.

          Note:

          I also moved that trailing forward slash public_html//assets, but it still did not display the images.