HTML does not find image <img>

Asked

Viewed 1,144 times

0

Good evening, I’m having a problem with the HTML tag,I started a project for a website of a virtual store, first I did an HTML draft, then when I went to the PHP part, I installed the WAMP environment and so on, when playing my templates to wamp’s 'www' folder I had a problem on one of the pages, some images stopped being recognized by the template, being in the same directory, the path is correct, but only one image is working, follows an excerpt of the code below:

<div class="w3-row-padding">
    <div class="w3-third w3-container w3-margin-bottom">
      <img src="../imgs/img2.png" alt="Norway" style="width:100%" class="w3-hover-opacity containerimg">
      <div class="w3-container w3-white">
        <p><b>Lorem Ipsum</b></p>
        <p>Praesent tincidunt sed tellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam non fringilla.</p>
      </div>
    </div>
    <div class="w3-third w3-container w3-margin-bottom">
      <img src="../imgs/img4.png" alt="Norway" style="width:100%" class="w3-hover-opacity containerimg">
      <div class="w3-container w3-white">
        <p><b>Lorem Ipsum</b></p>
        <p>Praesent tincidunt sed tellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam non fringilla.</p>
      </div>
    </div>
    <div class="w3-third w3-container">
      <img src="../imgs/i.png" alt="Norway" style="width:100%" class="w3-hover-opacity containerimg">
      <div class="w3-container w3-white">
        <p><b>Lorem Ipsum</b></p>
        <p>Praesent tincidunt sed tellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam non fringilla.</p>
      </div>
    </div>
  </div>

"img4.png" and "i.png" images are no longer being recognized, but in the files outside the wamp directory, which are exactly the same thing, it still works. It is not something very important, I left everyone with the image that 'works' since at the moment it is only for draft, for me to have an idea of how the page will look, but I was curious,.

Grateful from now on!

  • 1

    With the image that does not load what error appears in the Devtools Console? Have you tried using a new image? Grab some image qq on the net and test to see if it loads

  • Images that are in the cloud work, but I just did the following, Inkei an image of the cloud, worked, downloaded the same image, set the path and no longer worked... Like me?

  • Press F12 and click here to see the error in the Tab console http://prntscr.com/muvp1n It may be a WAMP configuration, not to allow this type of MIME Type, something I find very unlikely... Then see the error that appears and speaks there, but most likely it is error in the image walk

  • Thanks for the tip, buddy! But in the image path is not, being that the image that is working correctly is in the same folder, same format, I’m just changing the name between the last bar and the ". png", the console accused not found, http://prntscr.com/muvu9d MIME Type, I don’t know what it is but I’m already googlar here to see if it can be that, thank you!

  • 1

    The message is clear, the image was not found, face the link may be right, but from what I realized you access the img by .. /image if you exit the directory and include in the other file this code and it is in the directory of layer supeior or lower it will not find the image and will give notfound, whenever I work with image I use a constant that I define in the projects called ROOT, whenever I will include an image use the root and never the problem, no matter where the file is it will find

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.