cancel
Showing results for 
Search instead for 
Did you mean: 

Thumb-url in head section

Thumb-url in head section

Hi,

 

We're using Google Custom Search on our Magento-install and would like Google to show the product images in search results. This is possible but not happening on our site right now. Google told me that this is because it finds no location of a thumb in the section of our product pages. 

 

The question is how we can make those thumb-url's appear in the head. Google says there are two ways to make this happen: https://support.google.com/customsearch/answer/1626955?hl=en

 

Using a Page Mag

 

<!--
  <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>
-->

Or using a thumbnail meta tag

 

<meta name="thumbnail" content="http://example/foo.jpg" />

After some unsuccessful trying I'm turning to this forum. Is there anyone who knows how I can make the thumbs appearing in the head?

 

Already tried adding this in head.phtml

 

<!--
  <PageMap>
    <DataObject type="thumbnail">
      <Attribute name="src" value="<?php echo $_product->getImageUrl(); ?>"/>
      <Attribute name="width" value="100"/>
      <Attribute name="height" value="130"/>
    </DataObject>
  </PageMap>
-->

But that gave errors on the category pages...

 

Hopefully someone is willing to point me in te right direction.

 

Our site-url is: https://geschiedenis-winkel.nl/

 

Thanks in advance, 

 

Yuri

3 REPLIES 3

Re: Thumb-url in head section

@historiek Appearing that you're implementing Rich Snippets for your site. Here you find details information how to do - http://www.gotgroove.com/ecommerce-blog/developers-toolbox-adding-rich-snippets-to-magento-products-...

 

And to test, tool is - https://search.google.com/structured-data/testing-tool

 

Cheers 

-
Magento Programmer | Was my answer helpful? You can accept it as a solution.

Re: Thumb-url in head section

 According to Google we need to point them to the thumb-url via 

 

<meta name="thumbnail" content="http://example/foo.jpg" />

 

or 

 

the PAGEMAP in the head of our pages. 

Re: Thumb-url in head section

Obviously you need to work on expanding the snippet. I faced such issue, found the solution here: https://ecomitize.com/category/magento-guides/
You can check the result in the tool https://search.google.com/structured-data/testing-tool