I am completely new to coding and I am doing the responsive web design course on free code camp. I am trying to make a french bakery website to learn web development, but when I put an image, it doesn't appear. I tried to use an URL instead but it didn't work. So I tried the solutions that I saw on this website and others but none of the solutions worked. Thank for your help.
The code
The result
Replace images/Baguettes.jpg by Baguettes.jpg because you don't have a folder named ìmages
You don't have any images folder
Do this:
<img src ="Baguettes.jpg">
Instead of:
<img src ="images\Baguettes.jpg">
As you have define wrong image path because your image is not in image folder so please replace the following
<img src ="images\Baguettes.jpg">
with
<img src ="Baguettes.jpg">
or if you want the same path
<img src ="images\Baguettes.jpg">
then please add your image in "images" folder
Related
i'm a beginner in web design and i have this folder and inside are the html, css, and images that needs to be submitted to my prof and i'm not sure if the images i linked on the html will be seen because the location of the image i linked there was the location of the image on my pc. for example i put
<body>
<img src ="C:\Users\project\pic.jpg">
</body>
Will my prof be able to see it? If not, is there another way how? Thanks!
You're right, they won't be able to see the image.
Create a new folder in the project folder you already have. Image folders on the web are often named - img or images
Copy your picture to it.
change <img src ="C:\Users\project\pic.jpg">
to <img src ="images/pic.jpg">
Zip your project folder and send the zip.
<img src="/yourfolder/Users/project/pic.jpg"/>
You need to copy your image before use in html file otherwise you cannot able to share your product with image
I have just started to learn about coding today. I'm learning from a video on Skillshare, which isn't probably the best but I guess it will work for the basics. I know that I am supposed to type this: <img src="image link"> but when I do it and refresh it it doesn't show up on the webpage. If I do it on this website it works. Tips?
Thank you in advance
First advice is to clear your browser cache, then try opening the broken image in a new tab or view source and check the image link to see if you have the path to your image entered correctly. Also sometimes the extension needs to be exact on some browsers jpg or png won't work if the file is written JPG or PNG.
Maybe you could post your code on the image link but I suspect the image path is incorrect or missing. <img src = "flower.jpg"> will look for the flower.jpg file in the same folder as where your html file is being stored. Browswer will look for different locations for the flower.jpg file for these examples : <img src = "\images\flower.jpg">, <img src = "http://www.nat.com/flower.jpg">, the former it will look for a sub-directory called images from the current directory. The final example allows you to get the image file directly from a URL if you know such a file exists.
Hi as stated <img src="image link"> is not working due to several reason such as incorrect path. Normally the html will look to the direct path for html stored location to find the image.
Example will be <img src="test.png"> if file does not exist named test.png it will return broken image such as like this now back to your question you have stated that
If I do it on this website it works
this is because the website have already have a image in the server name according to your <img src="image link"> that is why it is working inside the website. Hope this explanation answered your question good luck.
I am trying to insert an image from my computer into my HTML page (hopetnorman.pythonanywhere.com) and it's not working. Here is the code:
<img src="C:\Users\Alan\Downloads\Thomas Logo\Dogo.jpg" height="50px" class="Barpic">
Anybody know why?
It sounds to me, like you're trying to put a local file into a hosted page. This would not work, because the hosted page does not know where "C:\" is.
For it to work on a hosted website, you need to upload it from your computer to the page, or at a service that hosts your pictures and use the path to that online picture to your html site.
It would need to look something like this:
<img src="http://hopetnorman.pythonanywhere.com/Thomas%20Logo/Dogo.jpg" height="50px" class="Barpic" />
Or if the picture lies in the same folder as your page.
<img src="./Dogo.jpg" height="50px" class="Barpic" />
Also for code posts, there is a button "{}" while editing.
Maybe the best way will be if you put your image into folder where you have your html file then:
<img src="Dogo.jpg" height="50px" class="Barpic">
Or make another folder in folder where your html is for all your images:
<img src="folderWhereIhaveHTML/folderForImages/Dogo.jpg" height="50px" class="Barpic">
I figured out a way -
I posted it on imgur then copied the image address from there.
This is my first post so please bear with me.
I am working on a WordPress site and came across a problem with my images.
I have a background image in my stylesheet
background-image: "images/dummybg.jpg"
and that works just fine and shows up
When i go to the index file and try
<img src="images/dummybg.jpg">
the image does not show up.
Both the .css and index.php are loose in my folder so their relative paths SHOULD be the same. So my question is, why would one path work and not the other?
WordPress has a function to get to your image directory
So from your index it would be:
<img src="<?php bloginfo('template_url'); ?>/images/dummybg.jpg">
Have you used image in css. it's automatic get image path.
but if you used in any other file in tag you have must need put whole image path in src attribute.
you need to put current theme path in bellow wordpress function you will get.
get_template_directory();
if you need more details please visit
wordpress functions
I am sure it's work for you.
I read adding image to eclipse web project which should be the same problem as I do.
But the solution is not working for me.
I also have the same folder called images inside WebContent, and i have a jpg image inside it. And in the html web page, i use <img src="images/qrcode.jpg" /> . The page does not show the image, I also tried, <img src="/images/qrcode.jpg" /> <img src="../images/qrcode.jpg" /> but they not work either.
Can any body help me with this?
PS: I use the below code to to go to my page(wodinow is the project name, the html is inside the folder of pages)
response.sendRedirect("/wodinow/pages/userhelp.html");
have you checked given extension is correct? may be JPEG, jpeg. If nothing is work post your folder structure.