- 108
Share:
There are several possible reasons why your images are not showing up on your pages as expected:
- The image fileis not located in the same location that is specified in your IMG tag.
- The image does not have the samefilename as specified in your IMG tag.
- The imagefileis corrupt or damaged.
- The imagefilenever actually gotuploaded.
Brokenlinksor images cannot be caused by problems on theserverside. They can only be caused by incorrectHTMLcoding or errors in uploadingimagefilesto ourservers.
Troubleshooting
Troubleshooting broken images should begin with the following steps:
- Position your cursor over the broken image and right-click your mouse. A popup menu should appear with several options.
- Left-click on the option to view Properties. The Properties dialog will display the Address/URLof the image as it is defined in yourHTMLpage. It should look similar to this:
https://www.example.com/my-image-dir/myimage.png
Obviously, you want to substitute yourdomainname, subdirectory, and imagefilenames where appropriate. The two most common image formats in use on the web today are PNG and JPEG, but could also be GIF or the newer WEBP, so your image will, more than likely, end with either the .PNG or .JPEG extension.
TheURLthat is displayed in the property dialog shows the location that yourweb pageis tellingbrowsersto look for the image. Write down the path, or copy and paste it into your favourite text editor so that you can refer to it later.
Now that you know where the image is supposed to be and what it's supposed to be named, verify that it's there. Go to yourControl Paneland click on 'FileManager'. You will need to click on the public_htmlfolder. Thepathrepresented by "www.example.com" is your "public_html"directory, so the first place to go is to thatdirectory. Check and see if your image is in the correct directoryin thepaththat you have above and that the filename is correct.
You can also use yourFTPor SSH, log in to your account and navigate to thedirectorynamed in thepathyou've identified above. When you first log in to your account, you will be in your "root" or "system"directory(unless you have your client configured to automatically open in a subordinatedirectory.) Use the "cd" command to change directories inSSH.
Continue navigating until you reach the subdirectory (my-image-dir in the example above) in which your image (myimage.png in the example above) is supposed to be found. Once you're there, try to locate your imagefile(myimage.png in the above example).FTPclients will automatically display all thefileslocated in the currentdirectory. In SSH, to get adirectorylisting, type "ls -a" (without the quotes) and hit enter.
Chances are that by now you've discovered the problem. If the imagefileis not there, either put it there by clicking 'upload' in yourFileManager or adjust your image tag so that it reflects the correct location.
Here are some important things to remember:
- UNIXis CaSe SeNsItIvE. As far as ourserversare concerned, myimage.png, MyImage.PNG, and myimage.GIF are three completely differentfiles. Check yourfilename -- the filename in yourdirectoryand the filename in thepathincluded in yourweb pagemust match EXACTLY. If they don't, change one or the other so that they do.
- The case sensitivity issue holds true withdirectorynames, too. MyImageDir and myimagedir are treated as two distinctdirectorynames. Make sure thedirectorynames match, too.
And after all that if it still doesn't work -
If the systempathof the imagefilematches theURLof thebrowserpath*exactly*, and the image still doesn't show, then the imagefilemay be damaged or corrupt. Make sure the image loads on your local computer (try it out in yourbrowser) and thenuploadit again (in BINARY mode, if usingFTP).
If it still doesn't work, and you're a current customer, please ask for assistance by raising a web hosting support ticket. Or if not a current customer sign up for business class cPanel hosting today to get the support you deserve