Hotlinking: How do I differentiate between an image in a <img> tag versus an image link? - apache

I want to allow partial hotlinking to images on my website. I want to allow a specific site (Reddit) to be able to show an image from my website on their page, but if they click on the link to the image from that site, it should go to an image viewing page, rather than directly the image itself.
For example:
This other website should be able to have this
<img src="http://mySite.com/myImage.jpg"/>
on their page, and it should show the image. However, if they have this:
Link Text
A user who clicks on that link should get redirected to an image viewing page that contains some html, including the image, rather than directly to the image.
I'm trying to achieve this via mod_rewrite. However, those two cases have the same HTTP_REFERER. Is there anyway for my server to differentiate between that?

There is no way to do such thing! but if second site is your you can put optional query string at the end of URL the distinguish between them!

Related

Customize deepview by adding a image to it based on link data

I would like to customize my deepview with a specific image depending on where on my site it is clicked (custom product image for example).
I understand that I can not use javascript in the deepview but my thinking was that I might be able to pass a url to our cdn in the query parameters of the link but I can't figure out how to access it in the deepview.

Image sitemaps -- list same images on every page?

My website has very few images: 2 versions of the logo, a favicon, and a default user image. They are used on many pages. These images are also referenced from a /publicrelations page.
The website also has an animated image that is only in the background of the landing page, but I don't want this indexed.
When creating the image sitemap, should I
A: only do <url><loc>myurl.com/publicrelations</loc>infoAboutAllTheCommonImages</url>
B: do what is in "A" but for every page (i.e. <loc>urlToSomePage</loc>), even though every page will reference the same images
C: something else?
Thank you
The essence of including an image sitemap is for your image to be visible on the search engine results page. Question is- do you want your favicon and logo on the search results? If NO, forget about the sitemap.
If YES, there's no need to include the same image from every page. It's not relevant to the search results to have identical images. Just choose one.

Google Plus doesn't show article image, just shows title and article link

I am trying to share a post from my website(blog) onto Google plus but it isn't showing the featured image of the article, instead it is just showing the title and link of the article. I have microdata and also "og" tags for my page. When tested using Google Structured data testing tool, it is showing all good. I expect to get some help here. If I am trying to share the home page, it is showing an image, however if I am trying to share any post from the website, it is not showing any image. Please help, let me know if you need any more info, would be happy to provide.
One of post's from website
The og:image meta tag is being used by google plus rather than the image property within your http://schema.org/BlogPosting -as #abraham pointed out this is a broken link, it should go to http://top10grocerysecrets.com/Top-10-foods-for-releiving-inflammation.jpg - currently it includes /wp-content/uploads/sites/17/2015/07/ which isn't part of the image's path.
In the structured data it is valid, but not correct: BlogPosting has an image set but without a full path which may be why it gets ignored: the source should begin http:// etc. This is also needed if you want the image to appear in the google search results preview.
The WebPage element does not have an image set: only the BlogPosting does. Consider setting the same image property using a meta tag inside the WebPage element if fixing the BlogPosting image's path does not resolve the structured data issue, e.g.
<meta itemprop="image" content="http://top10grocerysecrets.com/Top-10-foods-for-releiving-inflammation.jpg" nt-post-thumbnail wp-post-image" alt="Print" />
In the structured data there are two unrelated mistake
the BlogPosting has author set to a link with fixed IP address http://162.244.66.231/top10grocerysecrets/author/cyoung this will reduce the chance of it connecting the blog with C Young's profile on the website.
the file name http://top10grocerysecrets.com/Top-10-foods-for-releiving-inflammation.jpg has 'releiving' in it, which is not the spelling used in the text on the image itself. This doesn't matter a great deal.

Google shows alt-text as website title

I am trying to optimize a web site which is managed by typo3. There is a page on this website, let's call it seminars. When I ask google to search for this Website by entering "Big Company seminars", I receive a result which looks like that:
Logo Seminars - Big company
url://seminars.bigcompany.de
The string "Logo" should not be displayed there. So I checked the source code and found that:
<title>Seminars - Big Company</title>
and
<img src="BigCompanyLogo.png" alt="Logo Seminars">
It looks like Google takes the alternative text of this image and uses it as the title for their search results.
Any ideas?
Google Search may change webpage titles they show on their result page. You can’t control this.
About your alt content:
Is the page about "Logo Seminars", or does "Logo" mean that the image is the logo? In the latter case, you might want to remove "Logo" from the alt content (or place it, for example, in square brackets). Note that, if the image is the only content of the link, the alt content should describe the link target, not the image.

How to tell image search which image matters?

Google image search seems to do a poor job on a site I run in identifying which image on a page should be indexed. In addition it doesn't seem to link that image with lots of the associated data.
Are there any ways of focusing attention for spiders on particular images and associated data, do they need to be within the same tags, or adjacent on the page?
A few tips:
Use a descriptive name, i.e. "tabby-cat.jpg" instead of "img02396.jpg".
Use alt tags on images.
Use descriptive text on the page and around the image.
Make sure the images are in the generated source, i.e. if you click "View source" in your browser, you see <img> tags.
It's also useful to validate your site at http://validator.w3.org in case there are major errors like missing brackets etc that could prevent a spider from parsing the page. (Note: I wouldn't worry about making everything 100% valid since Google is fine with invalid code)
Images in CSS (i.e. backgrounds) are not indexed AFAIK. However I'd suggest using CSS backgrounds for "design" images (a subtle way of getting Google to ignore site headers, custom borders, shadows, etc).
Nor are any images generated from Javascript.
Make sure you're not blocking images through robots.txt. I know that Joomla does this by default.
Sign up at Google Webmaster Tools, add your site, then allow it to be used in Google's "Image Labeller" game which should help tag images.
All images on a page should be indexed. If they aren't then improve your alt tags and possibly rename the image file. There really isn't anything more you can do since search-engines do not read any other context for the image itself except size. If google thinks the image is a duplicate it won't index it either.
Of course if images really do inherit context from the surrounding page then you could just use less images or move them into CSS.
I think Search robot can not read images as we do, so the simple and must thing you should do to your images is using descriptive names, so that spider could know what this image all about. Second one is using ALT tags on images, put in keywords relating to the images.
Those thing are what I do.