I am using the following code to show the image on the web-page.
<div float="right" width="30%">
<center><img src="jatinkhurana_image.jpg"/></center>
</div>
The above code is from an .html file. My image is also in the same directory in which the html file.
It's working fine when i am running the same when all the html file and image file is in my local directory.
Now I have uploaded all the files in ftp server.Everything else is working fine except it's not showing the image on webPage.
Things that I have tried...
I have logged on to that server and checked file is there or not.... file was there.
I have checked for the file name which is also right.
I don't know why this is not showing the image.
If anyone know, please help me !!!
Check your browser console an inspect that image element. When you find that image copy it's src attribute and paste it in new tab and check if you see the picture or not. If you do not see the picture you must have some broken link to the image, if you see the image in new tab disable all the extensions of your browser like ad-blocks etc and let me know.
EDIT:
Also check if that, that place is blank or the broken image shows up. ( Like chrome loads a tiny broken image if the url is wrong )
Related
Why do Webp images display this error on VScode:
error
But they work fine on another IDE such as Repl.it? I did not change anything. The paths to the pictures are the exact same but for some reason the images work fine on repl.it but on VScode they display that error. Anyone know why this happens?
I cant share any code since its a whole project but to basically link an image, I do this both on VScode and Repl.it: ./assets/img/image.webp
assets is a folder in the root
Can VScode render Webp images or is that ability not supported as of right now?
Have this weird case when my images are being found in sources, linked correctly, src url is okay, but still not being displayed. Other images in that same folder are being loaded and displayed just fine, but my new uploaded images are not. I'm using open cart and upload images via ftp. Permissions are fine 644 like the others. I asked other developers in my team and no one has any clue why is that. Guys tried downlaoding and opening the image on their computer and can't even open it, whereas I'm using MAC and can open the same images on my computer without any problems. Images are saved as .jpg from Photoshop. What's the deal here? Here is how it looks in Mozilla:
This can happen because of corrupted image file. Most likely it is the extension problem of the file. Instead of doing save as in Photoshop, try exporting the image through export settings and choose png or jpg format there. It should work fine now, it worked for me.
Just to make sure on this front - Are you uploading them as .JPG or .jpg? If so, the problem may lie there...
If you link to a file that is .jpg and you put .JPG into the code for the link, the link will not work.
Make sure you're not using uppercase JPG as some servers will not read/detect them, and you will not able to see the pictures until you change the extension to lower case jpg.
Also, make sure the color mode, if saving them from Photoshop directly to jpg, is RGB format. If you use any other color mode, it may not display at all. CMYK files for example will not display correctly.
So I've uploaded my html, css and js files via Pydio. But the site seems to get messed up. Can anyone tell me what happened to it and how to fix it?
Some of the google font I used shows up but some didn't. Also, the bootstrap grid doesn't show up like its supposed to be. The site also didn't scale according to screen size.
When I preview the website in Brackets, it looks perfectly fine.
Please help.
mean-design.com
I think that you forgot to upload some files.
Here is the list :
( click on the image to zoom in )
Sounds to me that you did not upload everything or there are some absolute paths in your code. If you copy everything you uploaded to another local machine, does it work then?
You can actually see which files are missing if you open the online version of your page in your webbrowser and have a look at the developer console (press F12 in Chrome, Ctrl+Shift+I in Firefox). In the console all missing files are stated in the logged errors.
Thanks to Relisora we even have a screenshot of the error console:
Check if you uploaded all files and if so, check their path and link tags.
I have a issue of displaying .png images on web my web page. Other image types excluding .png just work fine. The issue is .png. The web site is located in a sub domain. In the root, a wordpress site is running.
In firebug, I can see a 403 error. But I can assure that I have set 0777 permissions for all images. It couldn't be a permission issue.
Rarely, .pngs are loading. But the second request gives a broken image. I have applied different cache removal techniques including <FilesMatch> directive in .htaccess, appending version attributes to image link, using # ...etc. But nothing works.
The most complicated point is that when copy & paste the image link in browser it shows the .png. However not within a web page.
Can anybody help me resolve this?
Thanks in advance.
Even I tried executing it in a browser. But the .png image doesn't showup for me.
Try changing the image folder permission to 755 or 644.
I am new in Ubuntu, as well as using lampp, My problem is, after storing image in image folder of my apps, image is not showing in HTML file ( image not found ). localhost document root is /opt/lampp/htdocs/, and my root folder is f_21 if I use the following link
http://localhost/f_21/index.html // not works
But image showing works well if I use following link:
file:///opt/lampp/htdocs/f_21/index.html // but it works
Any idea ??
You should keep both image and index.html files under htdocs.
for you,place your index.html and image files under f_21 folder and update src attribute of img tag in your index.html
If the link to the image is an absolute path based on your file system with the file protocol, then you won't be able to load it when viewing the html page over http.
Chrome doesn't (I'm not sure about other browsers) allow loading local resources on a file requested with http.
If you're using chrome, you can press ctrl+shift+j to see the console, which will show any errors. You might see something like: Not allowed to load local resource.
The solution is to change the src of the image to be relative to the html page it's on.