Welcome! Log In Create A New Profile

Advanced

Images not showing

Posted by Mac 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
avatar
Mac
Images not showing
July 08, 2013 12:56PM
There are many reasons, so see this thread:

http://osprey.unisa.ac.za/phorum/read.php?406,99302
avatar Re: Images not showing
August 12, 2013 09:28PM
Hi

I was ready to submit my assignment 1, but when I checked my web page on my Internet explorer and mozilla fire fox, my image doesn't display.

I made sure my case for both the image on the HTML file and my desktop where exactly the same and they where the same. I even tried to
edit the code where I uploaded it in the ftp server, but no luck.

Not sure what to do, here is my code:

<html>
<head>


</head>
<body bgcolor="red">
<div align='center'>
<font face="Arial"> <font size="16">78120497 Silindile Nkosi

<div align='center'>
<img src= "1(136).JPG" width="59" height="89">

</div>

</body>
</html>

'Start small, start young'...
avatar Re: Images not showing
August 12, 2013 09:55PM
You have <div align="center"> twice, but only one closing </div>.
Delete one of them.


Your <font> attributes don't have any closing </font>

The name for your image is very unusual, not sure it should have brackets within the name.
Is the actual image file in the same directory as your HTML file ?
avatar Re: Images not showing
August 12, 2013 10:11PM
Hi

No the image is on my desktop.

We are welcome to use any image of our own, right?

'Start small, start young'...
avatar Re: Images not showing
August 12, 2013 10:20PM
Your src attribute is expecting to find the image in the same directory as the HTML file.
Either put the image in the same directory, or put the full pathname in the src attribute.

I would also suggest that you rename the image to remove the brackets from within the name.
avatar Re: Images not showing
August 12, 2013 10:29PM
Ok let me try that.

'Start small, start young'...
avatar Re: Images not showing
August 12, 2013 10:34PM
Ok, I put the image in the same directory and removed the brackets and still nothing. Here is my code:

<html>
<head>


</head>
<body bgcolor="red">
<div align='center'>
<font face="Arial"> <font size="16">78120497 Silindile Nkosi

<div align='center'>
<img src= "1 136.JPG" width="59" height="89">

</font>
</div>

</body>
</html>

</div>

'Start small, start young'...
avatar Re: Images not showing
August 12, 2013 11:35PM
You still have 2 x <div align="center">, delete one of them.
The </div> after the </html> serves no purpose at all. The </html> is the very last statement, nothing after it.

You have 2 x <font> statements, but only one </font>.

Remove the space from the image name, and make sure that the name in the src attribute is EXACTLY the same as the actual image name.
avatar Re: Images not showing
August 12, 2013 11:51PM
Language: HTML
<html> <head>   </head> <body bgcolor="red"> <div align="center"> <font face="arial" size="16"> 787120497 Silindile Nkosi </font> <br> <img src="php.jpg" width="115" height="61"> </div> </body> </html>

This works fine - put in your own image name and sizes.
Image must be in the same directory as the html file.
Remove the <br> if you do not want the image on a new line.
Re: Images not showing
August 13, 2013 04:14PM
Hi Bigron11

I got more or less similar problem as Sli, I'm not so sure where I went wrong. Because when I test my HTML code from the Notepad++ and view it on the IE or Mozilla Firefox I get the perfect results I needed, but after uploading my HTML file and the CSS file as well as my JPEG file onto the FTP server, I get the 403.html (Forbidden) page as an error. So I can't be sure to send my URL with this error when I try to go my web page. Please have a look on the code below, I have used the CSS on my HTML code and I have linked both codes:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">;
<html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Welcome to my first web page!</title>
<link rel="stylesheet" href="styling.css" type="text/css" media="screen, projection"/>

</head>

<body>

<div id="Info">
<p><i>Student Number</i>: <b>72668547</b></p>
<p><i>Name</i>: <b>Tshepisho</b></p>
<p><i>Surname</i>: <b>Mokgosi</b></p>
<br>
<img src="mypic.jpg" alt="Handsome young rich man."/>
</div>

</body>

</html>
avatar Re: Images not showing
August 13, 2013 04:54PM
403 is generally an error emanating from the server - you may not have the authority to access specific directories for example.
Only the ISP can correct that.

Is the directory where you uploaded your code publicly available ?


Other things to try -

Clear your browser cache,
Clear all cookies.

Try and access the page using the full directory / file name, and not just the directory name.

ie: www.myhost.com/index.html

and NOT just www.myhost.com

See if doing the above makes a difference.

PS Use the formatted code tool to post code.
avatar Re: Images not showing
August 13, 2013 05:09PM
Other possible causes -

You must have a file named index.html or (index.php) in the directory.

Are you sure you uploaded to the correct directory ? If the directory you are trying to access is empty, then you can also get a 403 error.
avatar Re: Images not showing
August 13, 2013 07:41PM
Thank you bigron11

You would make a good tutor, thank you for explaining the bit about not putting anything after the </html> .

Assignment done.thumbs up smiley

'Start small, start young'...
Re: Images not showing
August 14, 2013 11:43AM
Wow!!!

Bigron11 you the bomb smileys with beer hot smiley

Assignment done, i guess i was accessing it the wrong way.
You really should be the tutor, great staff!!!!
Re: Images not showing
August 15, 2013 10:10AM
Morning

I have manage to register my website on the freewebhostingsite but my picture is not showing, but on internet explorer its showing.
avatar Re: Images not showing
August 15, 2013 10:38AM
Did you upload the picture file as well ?
Is the picture in the same directory as the index.html file ?
Is the image file name and src="ïmage name" EXACTLY the same ?
Windows server (your computer) is not case sensitive, the server, which is probably running Linux, will be case sensitive.
Re: Images not showing
August 15, 2013 10:42AM
mudau-72248173 Wrote:
-------------------------------------------------------
> Morning
>
> I have manage to register my website on the
> freewebhostingsite but my picture is not showing,
> but on internet explorer its showing.

Please clarify - you say it is not showing, but it is showing on IE. Where is it not showing?
Re: Images not showing
August 15, 2013 10:59AM
The picture its not showing on the website that I created. www.mudaumichael.6te.net
Re: Images not showing
August 15, 2013 11:24AM
Ok, so I'll assume that when you say it IS showing in IE, you mean your local copy on your PC displays the image correctly when view in IE, but the copy on the freehosting server does not display the image when viewed in IE. In that case, did you upload the image to the freehosting website as well and is it in the same location relative to your local copy?
Re: Images not showing
August 16, 2013 12:23PM
Hi mudau

you can shorten your html code with the picture ie <img src="graphics/michael.jpg" width="216" height="295" alt="michael" class=""auto-style1" title="micheal"/> and I see you using text-align: center for your image.you could use position: relative; then margin: 0 auto; to center it smiling smiley It can't fine the image when I click on src image link,make sure the file extension is right and the directory path smiling smiley
avatar Re: Images not showing
August 19, 2013 10:20PM
Quote
mudau-72248173
I have manage to register my website on the freewebhostingsite but my picture is not showing, but on internet explorer its showing.

In your code you reference to a sub folder called "graphics" <img width="216" height="295" alt="michael" src="graphics/michael.jpg"></img>

I tried to access this folder from your free domain bit I get a 404. This means that the sub dir does not exists on the server.

What you need to do is to create the sub folder graphics on your free server and upload you img file michael.jpg into that sub folder. Once you have done so your image will display.

Regards,

Jaco
Re: Images not showing
August 20, 2013 12:28PM
Thank you Jaco I will do it tonight as i don't have my laptop with me at work.
Re: Images not showing
October 20, 2013 06:44PM
Greetings Prof. Mac van der Merwe,

The image on my browser is not showing.
Here is my code;

<html>
<head>
<title>
Paul Masaku Soo
</title>

</head>
<body bgcolor="#cccc99">
<div align='center'>
<p><b>78111889</b></p>

<p><h2>Paul Soo</h2></p>
<img src="images/bgimage.gif" height="175" width="175" alt="Paul Soo">
</div>

</body>
</html>


Kind regards.
Re: Images not showing
October 21, 2013 06:53AM
Did you put the image file "bgimage.gif" in the "images" directory?
Re: Images not showing
October 21, 2013 08:44PM
Greetings Prof. Mac van der Merwe,

Yes, I put the image file bgimage.gif in the images directory (folder).
Re: Images not showing
October 21, 2013 08:55PM
Greetings Prof. Mac van der Merwe,

I've tried copying the image file on the same directory (folder) as the index file and edited my script to this end.

Here's my script;

<html>
<head>
<title>
Paul Masaku Soo
</title>

</head>
<body bgcolor="#cccc99">
<div align='center'>
<p><b>78111889</b></p>

<p><h2>Paul Soo</h2></p>
<img src="bgimage.gif" height="175" width="175" alt="Paul Soo">


</body>
</html>

Kind regards.
Re: Images not showing
October 21, 2013 08:57PM
Greetings Prof. Mac van der Merwe,

It still does not show the image.
avatar Re: Images not showing
October 21, 2013 09:52PM
Is the actual image name exactly the same as this "bgimage.gif" ? (Without the quotes)

Including capitalization ?

Eg: If the actual image name is "Bgimage.gif" or "bgImage.gif" it will not work.

As long as the actual image name is exactly the same as the name in your code, there is no reason why it should not work.
Re: Images not showing
October 22, 2013 07:39AM
Your code looks right and I tested it with my own .gif image and it works. The only other thing I can think of, except what bigron11 said above about the filename, is that the image might be corrupt or not a .gif image (somethig like .jpg or .png).
Re: Images not showing
October 22, 2013 02:06PM
Good day

Another problem could be you didn't safe your picture in the same directory as your code, for instance you saved your picture in the Picture folder and your Picture folder is not in anyway connected to your code folder.

e.g. Desktop is where you saved your code, and Libraries, under pictures is where you saved your image, hence picture not being able to be recognized as you run the code.

Hope this will you.

Happy coding smoking smiley
Sorry, only registered users may post in this forum.

Click here to login