Detect image metadata with the Image Properties Crawler
Crawl your image links to enhance your feed with image metadata using the Image Properties Crawler data service in Productsup.
Introduction
The Image Properties Crawler is a Productsup data service that gathers image metadata by crawling image links. The crawled metadata includes image type, height, width, file size, etc.
A popular use case for the Image Properties Crawler is to check the availability of your image links based on the links' HTTP responses. To ensure your products don't use broken images, you can let the platform use the metadata gathered via this service to skip products with unreachable image links during export. See Use the crawled image metadata for more information.
Note
The Image Properties Crawler service is available for the import and intermediate stages.
When crawling the image links listed in one of your feed's columns, the Image Properties Crawler extracts image metadata from the HTML code of those pages. It creates an additional data source in your Productsup site to add and populate the following columns:
___service_imagecrawler_url
duplicates the crawled image link for technical purposes.___service_imagecrawler_date
states the date of the last crawl in the Unix time format.___service_imagecrawler_http_code
displays the HTTP status code of the crawled link.___service_imagecrawler_width
contains the original image width.___service_imagecrawler_height
contains the original image height.___service_imagecrawler_mime
stores the image MIME type.___service_imagecrawler_content_type
displays the HTTP response with the content type of the crawled link.___service_imagecrawler_size_download
states the original image file size in bytes.___service_imagecrawler_total_time
shows how long it took the crawler to fetch the image.___service_imagecrawler_md5_url
contains the crawled URL encoded in MD5.___service_imagecrawler_md5_image
stores the image encoded in MD5.
Warning
The Image Properties Crawler can slow down the performance of your Productsup site because it is a resource-intensive process.
Prerequisites
Note
The Image Properties Crawler service is part of the Crawler Module, which is available at an additional cost in all platform editions. Contact your Customer Success Manager to discuss adding it to your organization.
The Crawler Module contains the following features:
The Data Crawler data service
The Web Crawler data source
The Image Properties Crawler data service
To set up the Image Properties Crawler data service, you need:
A product identifier. See Set a product identifier for more information.
The rights to the domain you want to crawl. You must be the owner of the crawled website.
A column in your feed that contains image URLs. The URLs must have no tracking parameters.
Before running the Image Properties Crawler data service, you should discuss the specifics of your website's performance with your website admin to gather the information required for setting up the service. Find answers to these questions:
How many crawlers can access your website at a time?
What are your website's average and maximum response times?
Add the Image Properties Crawler
Go to Data Services from your site's main menu and select ADD SERVICE.
Search for Image Properties Crawler, select Add, and give it a desired name and column prefix.
By default,
___service_imagecrawler
is the column prefix.Choose the stage containing the column with the crawled URLs in Service Data Level and select Add.
Choose the column in your feed containing links to your landing pages in Image URL Column.
If you chose Import in Step 3, the drop-down list Image URL Column displays the columns of your import stage. If you chose Intermediate in that field, the drop-down list contains your intermediate-stage columns.
Note
If you want to crawl multiple columns containing image links, you need to create a copy of your Productsup site and set up an Image Properties Crawler service in the copied site to crawl another link column.
In User Agent, you can see the name the crawler uses to access your website. By default, the name is
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.6) Gecko/20070802 SeaMonkey/1.1.4 (productsup.io/crawler)
. You can modify it as needed, for example, by adding a hash at the end of the crawler name for security reasons.Tip
Whitelist your Productsup crawler using the name specified in this field for your website not to block the crawler.
In Concurrent Crawlers, choose the number of crawlers that can access your website simultaneously. By default, the number is
10
.Warning
If you engage more crawlers than your website can handle, the crawling process can run quicker but may cause website performance issues.
In Request Timeout (seconds), you can set how long the crawler should wait for a response from your website. The expected input format is a digit identifying the number of seconds.
Use your website's maximum or average response time to enable the Image Properties Crawler service to run efficiently.
By default, the crawler waits 10 seconds for a response before proceeding to a different link.
Enter the number of days the Image Properties Crawler service should wait before recrawling a link in Expires After (days). The expected input format is a digit identifying the number of days.
The Image Properties Crawler service crawls all new or changed links in your URL column every time the site runs. The Expires After (days) field determines when the service should recrawl the links it has already crawled.
Tip
You can enter
-1
in Expires After (days) to recrawl all image links every time your site runs in Productsup.If you want the platform to run the Image Properties Crawler service during every refresh in Data View, select the checkmark icon (✔) in Trigger during a refresh of the Data View.
Select Save.
For the platform to process a new data service, select Import or Run in the top-right corner of your site's view.
Warning
Once the Image Properties Crawler has started to run, you can't stop it.
The first run of this service crawls all image links you have selected in Step 4, so it may take a while. The recommended time for the first run of the service is at night or at another time with low customer traffic on your website, which would minimize website performance issues.
If you need to work in Data View during a crawl, you can speed up Data View loading times by minimizing the number of displayed products per page in the upper ribbon.
Note
If you can't see the columns the Image Properties Crawler added to your feed in Data View, ensure the platform hasn't hidden them:
Go to Data View from your site's main menu and choose the relevant stage or export in the drop-down list on your left.
Select the menu icon on the right and then select the eye icon.
Find the attributes in the list that use the custom prefix
___service_imagecrawler
and select the eye icon next to each attribute you want Data View to display.Close the pop-up menu.
The naming of the attributes created by the Image Properties Crawler data service depends on the column prefix you chose in Step 2. The attribute names the data service generates always start with three underscores (
___
), which means the platform doesn't send those attributes to your export channels.
Use the crawled image metadata
Once you map the new columns created by the crawler with the relevant columns of the subsequent stages in Dataflow, you can start working with the crawled data using rule boxes:
Use Image Designer Template (limited) - This rule box lets you apply Image Designer templates to the images in your feed. You can create different segments in Data View for different image sizes and use this rule box to apply different Image Designer templates to different segments.
Skip Row If Value In - This rule box lets you skip products with unwanted values during export. If applied to
___service_imagecrawler_http_code
, it can skip all products whose image links are unreachable. If applied to___service_imagecrawler_height
,___service_imagecrawler_width
, or___service_imagecrawler_size_download
, it can skip products whose image heights, widths, or file sizes don't meet channel requirements. To skip products with unwanted images, you can:Create a system column on the export stage of Dataflow by adding three underscores (
___
) at the beginning of the column's name.Map a relevant column created by the Image Properties Crawler to the new export column.
Apply the Skip Row If Value In rule box on the export stage.
Tip
Your links may display a placeholder image for unavailable images, for example, containing the text Image Not Found. In this case, the crawler gets a positive HTTP status of the image link because the link works and contains an image, which means you can’t skip these placeholder images using the rule box Skip Row If Value In with column
___service_imagecrawler_http_code
. You also can't exclude such images based on their links because the links are most likely different each time.You can use the column
___service_imagecrawler_md5_image
to identify such cases:Go to Data View and select the needed stage in the drop-down list on the left.
Find the column
___service_imagecrawler_md5_image
and select Analyze.Check if any values repeat in the Distinct Values section.
Select a repeating value to see all products with the same image.
Once you have identified the value that belongs to the unwanted placeholder image, go to the export stage containing the attribute you mapped to
___service_imagecrawler_md5_image
and apply the Skip Row If Value In rule box to that attribute.
If you need help, contact support@productsup.com.
Edit the Image Properties Crawler
Go to Data Services from your site's main menu.
Search for your data service.
Select the cogwheel icon (⚙) next to the desired data service to edit settings.
Select Save.
Delete the Image Properties Crawler
Go to Data Services from your site's main menu.
Select the cogwheel icon (⚙) next to the desired data service.
In the Danger Area panel, select Remove this service.
Select Yes.