: Can I tell Google which image to use for the preview in custom search? I currently use Google custom search for my static site. When I use it, I sometimes get images next to the entry:
I currently use Google custom search for my static site. When I use it, I sometimes get images next to the entry:
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?
More posts by @Sue5673885
1 Comments
Sorted by latest first Latest Oldest Best
I believe this is what you are looking for - 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" />
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2024 All Rights reserved.