Content Aggregator for Products (CAP) / Useful tips on working with CAP Content


Working with Images in CAP

Wed, Feb 1, 2023 at 9:41 AM


There are 3 main types of images that can be found in the XMLs delivered via CAP: 

  1. Product-only images (in a variety of formats and sizes)
  2. Lifestyle images (single image size) and
  3. Annotated images (images with text – 2 image sizes).
     

All images are delivered as links that can be embedded in any web page. Depending on the type of images needed, a publisher will need to access different sections of the XML:
 

 

Product-only images:

The <Images> tag will feature all product-only images and lifestyle images. This content will be available with every product XML. A publisher can select the right images for their pages based on a few parameters listed below:

 

  • <content_type> - image type, will be jpg, png
  • <image_url_https> - direct link to the image 
  • <dpi_resolution> - image resolution (72 or 300 dpi) 
  • <pixel_height> & <pixel_width> - image dimensions (includes a set of standard image renditions as well as the original image whose dimensions may differ)
  • <orientation> - image orientation, depending on product type one or several angles will be available (i.e. left facing, right facing, center facing etc.)
  • <background> - image background, may differ according to HP image standards. Current background options are: transparent; white.


Example of image information within the <images> section:



Lifestyle & other image types



The <msc> tag will feature annotated images (images with text) and other types of rich media. Unlike the product images, these come in the original dimension plus a thumbnail size and are not part of the standard HP content offering. Some products might not have this type of images. 

  • <asset_category> “Image - Annotated” for annotated images; “Image - At a glance”
  • <asset_type> - image type, will be jpg, png
  • <asset_embed_code> - direct link to the image, can be used to embed the image on a web page 
  • <resolution> - image resolution (72 or 300 dpi) 
  • <pixel_height> & <pixel_width> - image dimensions (includes a set of standard image renditions as well as the original image whose dimensions may differ): 
  • <back_ground> - image background 
  • <orientation> - image orientation, no standard set of orientations available 
  • <language_code> - field relevant for imagery with text, providing information on the appropriate language & localization (if this field is identical to the <culturecode> field at the top of the XML then the asset is valid for both the country & language. If only the country is a match then the asset may be available only in English for the specific country) 


Example of image information within the <msc> section:




Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.