For the complete documentation index, see llms.txt. This page is also available as Markdown.

Image binding

Bind product images after FactFinder data becomes available.

Documentation

Which components support image binding?

The following components support image binding:

  • ff-record

  • ff-suggest-item

  • ff-asn-group-element

Understanding image binding

By default, src="{{image}}" will be added to all children of an image binding element that have a data-image attribute.

The src attribute will only be added once data binding is available.

Using src="{{image}}" directly in the template could lead to invalid requests.

For example, this ff-suggest would show the suggested product's image:

<ff-suggest>
    <section class="productsContainer">
        <ff-suggest-item type="productName">
            <img width="100" height="100" data-image />
        </ff-suggest-item>
    </section>
</ff-suggest>

You can overwrite the default binding by providing a value for the data-image attribute.

See the API tab for further supported attributes on image binding elements.

API code

Properties

Properties
Name
Description

product-image-identifier (String) (default: "[data-image]")

CSS selector that determines the targeted children for the data binding.

product-image-error-identifier (String) (default: "data-image-onerror")

When the specified value names an attribute of a targeted child without an onerror callback, that value becomes its src when an error occurs.

Last updated

Was this helpful?