I have minimal knowledge of coding but I just spent the past 6 hours trying to resolve this issue.
Go here to see the image I am trying to have load.
If I am suppose to chance the SRC lines, how and where do I do that?
The HTML image loads perfectly from my computer.
Like what #mlegg said, I get the same error when trying to go to your link. It looks like that is no longer a valid URL or there is some form of security on it so it's only accessible from your computer (since you said it works from your computer?).
It could also be getting pulled from your browser cache if it was a good URL at one time. Try doing a Shift + Refresh of the page or purposely clear your cache.
If you have the image locally you could try uploading to a different web based repository and src it from there.
Just to cover all bases, I trust you know how to put an image on a web page using the img tag:
<img src="http://lorempixel.com/400/200/">
You might also want to try a different image that you know is available and accessible. You can use the URL above for lorempixel.com or you can scrounge up a different image from a Google Images search.
Related
I have a PHP file that I'm trying to get to load via an image tag:
<img src="https://example.com/tracker/">
I can see in Firebug that the PHP page is technically being loaded. But since it's not actually an image, it looks like not everything from that page is running - like Javascript that's supposed to run tracking certain visitors.
I'm probably just going to add all the javascript and stuff into the footer of each page instead, but I still don't understand why this didn't work.
Didn't affiliates used to load web pages as images for cookie stuffing like 10 years ago? I was under the impression that the page itself should load when being called, even as an image.
Or is it not loading as a result of some sort of browser security setting?
Loading an image that way won't treat the result as HTML and certainly won't try to run any javascript in it.
What that is good for is that /tracker/ can be a web application that does something with the request. Instead of just retrieving an image, it can increment a hit count or inspect a cookie. Then it can return an image of some kind, even if it's a 1x1 transparent PNG.
If you want to execute Javascript, then use a Script tag instead.
I developed some html pages with social sharing functionalities like Facebook, Twitter and LinkedIn etc.
But now, I have some problem to change LinkedIn image.
To share on LinkedIn I use platform.linkedin.com/in.js plugin:
When I change image from image6.jpg to another JPG file in metatag og:image, changed image couldn't be shared.
Please help me to solve this.
Thank you.
I post this answer for the developers touch Linkedin first.
The other social sites have no problem like this.
But facebook and Linkedin have this problem, because these sites have cache and save the first scraping data in cache (especially images).
Facebook cache can be removed by manually, but Linkedin cache can not be.
Linkedin cache restore scraping data for a week, and Linkedin clean cache after a week.
During this period (one week) the page you want to change image wouldn't be shared.
Because as I write, Linkedin show old data in cache , and save it again, so you have to wait for a week.
Only way to change image immediately is to change page url also.
Thank you.
So, let's think about this. Here is your what I think is the kernel of your problem:
...When I change image from image6.jpg to another JPG file in metatag og:image, changed image couldn't be shared....
At first, when you said When I change image, I thought you meant changing it in the HTML, but now I think what you mean is you are changing it through JavaScript: i.e. $(metaelement).content(newimage);.
If this is what you mean, it will not work. LinkedIn is doing a blind, simple, non-JS activated scrape/parse/cURL of your webpage. If you try to change <title> or <meta> tags with JS, the scrape will not see it. This is true with almost every type of scraped URL, in every single search engine, for instance, like google and bing (changing your <title> via JS will not be reflected in the search result). This is just how the Internet currently works!
Source: Microsoft LinkedIn Share URL Documentation.
For example, this works for me:
https://www.linkedin.com/sharing/share-offsite/?url=http://www.wikipedia.org/
See, it works fine:
If you are interested in a regularly maintained GitHub project that keeps track of this so you don't have to, check it out! Social Share URLs
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.
Edit :
in the html source I have thigs like :
<img src="./images/someimage.jpg" />
This displays fine IE/FireFox would display the images coming from URL's like "http://mypc" or "http://localhost" or ip adress on the netwrok , google chrome on Galaxy, Windows Machine, or google Android will not display the images.
After having burned too many hours trying various CSS, image src tag, html document description tricks, I have given up.
During my search I found (and lost) the link to chrome forums regarding this issue that seemed to say it is just so by users.
Anyone has any more information on weather it is possible to view images on local host/computer name on netwrok or ip adress?
try using http://localhost/resouce.jpg instead of http:/localhost/resouce.jpg
From your comment above (where you say if you put h11p://mycomputer/images/image1.jpg it works) and your question (where you put image URL of ./images/someimage.jpg), my guess is that you have a problem with the relativeness (lacking a better word) of your URLs.
E.G.
if your page is at h11p://mycomputer/folder/page.html and you use the relative URL ./images/image1.jpg to source the image then your browser will look in h11p://mycomputer/folder/images/image1.jpg to find that image.
This can also happen with URLs that have been rewritten to include additional slashes.
Solutions are to use either a url that is absolute on the site e.g. /images/image1.jpg (omitting the leading .) or to use a URL that is absolute to the host e.g. h11p://mycomputer/images/image1.jpg
The first solution is preferable because it will continue to work when you change the host-name/domain-name of the site.
** read http where I write h11p
I am having an intermittent issue the Facebook share link function does not pull the the link image from the page. This is happening consistently intermittently, that is, it keeps happening but not for a consistent page, image, style, etc. I can't find any pattern. Pages won't work, and then they will. Most pages work fine at the first attempt, but maybe 5% fail.
Each time it happens I check the URL in the Facebook debug tool, and it finds the article image without problem. Often, after I use the debug tool and then try to share the link again the image is found by Facebook.
The site uses Open Graph tags that check out with the Facebook debug tool.
Here is one example page:
http://zujava.com/must-have-school-supplies
Are there other factors that impact whether an image is pulled along with a URL in Facebook?
Facebook scrapes your page every 24 hours. So on the initial go unless you like the page or send it through the debugger, the image (and other meta data) will not appear.
Read more at
http://developers.facebook.com/docs/reference/plugins/like/#scraperinfo and
How does Facebook Sharer select Images?