I have some HTML file with an <img src="..."></> tag inside. I can open the HTML and see the image just fine. But when I sent this HTML file to someone (by email, Skype, or whatever), even to me, the image is no longer there. The error I get when I open the HTML that I sent to myself is:
Failed to load resource: net::ERR_FILE_NOT_FOUND
What may be causing the problem? I thought of uploading the image somewhere on the Internet, so there will be no problem with finding it when I point to it with a url.
if the source of the image is on your computer and not using a url, then you will either need to upload the image source onto the web or email the image source to the recipient.
you also need to make sure to have the image source located in the correct location/directory
Related
I'm using the debugger and scraping and scraping and scraping but the image won't update. It's grabbing the correct image URL in og:image when I debug it, and I've checked the URL and it goes to the correct image, but for some reason every single time the link preview is showing the old image.
Everything I've read just tells me to go to the debugger and rescrape it and it should just be voila! new image. Am I missing something?
I'm populating a page with images. Each one comes from an external url (imdb). But there is a set of images that are not loading, appearing as a broken link. All url's of such images include an '#':
<img src="http://ia.media-imdb.com/images/M/MV5BMjQyODg5Njc4N15BMl5BanBnXkFtZTgwMzExMjE3NzE#._V1_SX300.jpg" class="sf-img" style="opacity: 1;">
Oddly enough, when testing it locally (localhost) the images load without issue. But when I upload it to my server and test it, then the images appear as missing.
I'm kinda lost here. I'm not sure if the '#' is causing this or not.
The rest of the images load correctly.
Found the issue: The real problem was with the permissions from the requested server. I got 403 response when trying to include the image from within my page from my server. Its apparently a security measure from IMDB.
I got to the solution for this following these past questions:
I get a 403 error when inserting an image tag into my website
Getting 403 forbidden when dynamically loading images in AngularJS
In gmail when a file is sent as an attachment to an email, the recipient(s) can see a small portion of the contents of the file before even hovering over it. Now I'm very curius and in fact interested in implementing this in my own application. I've tried inspect element but couldn't quite get how they do this. Ok, with images I can somewhat understand how it's done. But how about pdf, word or excel document? Do they take a snapshot of some portion of the file and store it along with the attachment to later show it inside a container? Has anyone been able to do this? Is just html and css enough?
May be you have found a solution....
But am just updating an answer i just found
If you use Krajee Plugin then you can get that type of preview of the file. Its just not giving gmail like file preview but also giving other type plugin to upload and preview the images and files(almost every type). Giving below the links for your reference.
File Preview Demo
File Preview Icon Demo
I was just trying to add a background image from http://wallpaperswide.com/rocky_peak-wallpapers.html to my website.
The link to the particular image is http://wallpaperswide.com/download/rocky_peak-wallpaper-1920x1080.jpg.
However, if I try to load the image from the second link, it doesn't load. If I paste the URL into my browser, it redirects me to the first link.
Why does this happen? Thanks.
Edit
I'm getting some answers that there is an HTTP redirect. I know I can download the file and use locally.
However, the problem is that I'm writing a script that dynamically takes an image from the wallpaperswide.com site and automatically getting the image that fits the person's screen resolution. I just scan the page for the links and try to use those links. I can't download every image from the site and have them locally...
Any suggestions?
Because http://wallpaperswide.com/download/rocky_peak-wallpaper-1920x1080.jpg is not an image, it's a document.
HTTP urls always point to documents, therefore the web server is able to process it and give you the appropriate result.
The website author has added a 302 redirect rule while accessing the links directly, so you can't embed that link directly. Instead, you can download and refer it.
So I seem to be having a strange problem. When I open up my HTML pages locally, everything shows up and everything works. However, once I uploaded them to the server for my website only two of the images show up.
All of my images are in the same folder as all of my HTML pages and there are still a few images that work. Is this an issue with my image paths? Or is it something with my host since some of the images will load?
Here is the URL for my webpage: clepert.jomc-class.org
Must be a problem with images path since there a not on the server at the path that you wrote.
Maybe you didn't put them on the server or there has been a problem during the transfer. Check if they are on the server.
I got this for your background: Failed to load resource: the server responded with a status of 404 (Not Found). http://clepert.jomc-class.org/bckgrnd.jpg
So I would check for this file specifically on your server.
Otherwise your logo is a white image on a white background... so it won't show without a colored background.
The easiest way to solve such things is to check the browsers Developer-Tools and take a look at the console or network section (different from browser to browser).
You're getting an 404-Error so maybe the path is wrong, or the image is just not on your server.
Just because the browser gets a 404 back doesn't mean the file isn't there. It might be that the user / server doesn't have permission to access the file (not everyone uses the 401 status code).
Check the logs! They will save you LOTS of time.
Check the permissions of the directory and all other files you're
trying to access.
Make sure your paths are correct (local vs absolute, etc).
Post more details if that doesn't help.
Check the logs again.