Enterprise Search Not Grabbing Product Images From Shopify Product Page

Upon first ingestion, a default text based schema was created for me.

I need to create a custom schema for the web crawler to index.

The default index did a good job but it did not grab the product image, which is pretty critical for me to launch.

I want to grab the product image from here, but the href for the images does not contain the website domain it is a CDN link. How can I change the configuration rules to pick grab this link?

Hi @thahunt ! Welcome to the Community!

The best option for retrieving a specific field is using meta tags and content extraction. They both require to modify the page HTML in order for the crawler to find the specific field.

Basically, you can either:

  1. Add a meta tag to the head section of the pages:
  <meta class="elastic" name="image_url" content="//cdn.shopify.com/s/files/1/0626/9065/products/WH-J914-100-1-BLU_1.jpg?v=1638198344"">
  1. Add a hidden element next to the image tag:
<img data-elastic-name="image_url" src="//cdn.shopify.com/s/files/1/0626/9065/products/WH-J914-100-1-BLU_1.jpg?v=1638198344" alt="BLOUSON VARSITY JACKET" loading="lazy">
<div style="display: none;" data-elastic-name="image_url">//cdn.shopify.com/s/files/1/0626/9065/products/WH-J914-100-1-BLU_1.jpg?v=1638198344" alt="BLOUSON VARSITY JACKET</div>

Modifying the page and adding meta tags or attributes allow the Crawler to index the specific fields you need.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.