Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

I currently use Google custom search for my static site. When I use it, I sometimes get images next to the entry:

enter image description here

I think Google simply takes the first image in the article. But I would rather like it to take the featured image (which is most of the time not in the article at all, but much smaller than all images that are in the articles and shows the topic of the article much better).

How can I tell Google which image to use for the preview?

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

I believe this is what you are looking for - https://support.google.com/customsearch/answer/1626955?hl=en

You can specify thumbnail images as follows:

PageMap data in the section of your HTML page A thumbnail meta tag.

Using a PageMap

You can specify a thumbnail image by adding a PageMap (a block of code) to the section of your page. This content is invisible to users, but it can provide valuable information to Custom Search. Create a thumbnail DataObject for your thumbnail image, like this:

 <!--
   <PageMap>
     <DataObject type="thumbnail">
       <Attribute name="src" value="http://www.example.com/recipes/applepie/applepie.jpg"/>
       <Attribute name="width" value="100"/>
       <Attribute name="height" value="130"/>
     </DataObject>
   </PageMap>
 -->

(You can also use PageMaps to create actions and custom attributes.) Using a thumbnail meta tag

To specify a thumbnail image for a page, you can add a thumbnail meta tag to the section of the page, like this:

 <meta name="thumbnail" content="http://example/foo.jpg" />
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.