skip to Main Content

I uploaded an image to my web server just like all the images are. I created it in Photoshop and exported to a .png. The image resides under The code is src="" But the browser shows that the image does not exist. I’ve set permissions to 0777, I’ve changed the image path, tried a different image in the same path to confirm it’s reading the path right, and the image will just not show. You can view the link here, it will show nothing

EDIT: This is what the image is suppose to look like
EDIT: Removed links for privacy

2

Answers


  1. You forgot " at the end.
    It should be like this:

    src="img/SccBridgeLogo.png"
    

    OR

    Try adding / at the beginning of the path, that should tell the browser to search from index directory.

    src="/img/SccBridgeLogo.png"
    

    Note this only works if you are running on a site, running from index.html in browser will return in

    File:////
    
    Login or Signup to reply.
  2. I had to use the picture tag for fallbacks and came across this issue at that point.

    This use to work fine

    <img src="images/netgraph-logo.png" alt="NetGraph Logo">

    After adding the picture tag

    <picture>
      <source srcset="images/netbob-logo.webp" type="image/webp">
      <source srcset="images/netbob-logo.png" type="image/png">
      <img src="./images/netbob-logo.png" alt="NetBob Logo">
    </picture>
    

    In my case I was able to go down one folder from the root folder, therefore “./” preceding the rest of the url worked fine. You may need to back up several folders instead though, so be sure you are using the correct type of path.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search