> For the complete documentation index, see [llms.txt](https://docs.selvette.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.selvette.com/custom-sites/product-references.md).

# Set product references and images

Two dynamic attributes identify the product currently being viewed.

## Product reference

Set `data-tryon-product` to a stable value that does not change between visits.

For custom sites, use a reference such as:

```html
data-tryon-product="custom:silk-slip-dress"
```

The custom portion can contain letters, numbers, periods, underscores, and hyphens. Keep the value at 64 characters or fewer.

Selvette uses this reference for:

* product availability;
* Insights and CSV rows; and
* the custom add-to-cart hook.

## Product image

Set `data-tryon-product-image` to the full HTTPS URL of the product image used for try-on.

```html
data-tryon-product-image="https://your-site.com/images/silk-slip-dress.jpg"
```

Use PNG, JPEG, or WebP. The value must be a real product URL—not the example left in the copied snippet.

## Optional attributes

| Attribute             | Use                                                               |
| --------------------- | ----------------------------------------------------------------- |
| `data-variant`        | A fallback variant reference for add to cart                      |
| `data-collections`    | Comma-separated collection references for collection availability |
| `data-customer-email` | Prefills the result email field for a signed-in shopper           |
| `data-sample`         | Shows your own sample result before upload                        |

Next: [Allow your storefront origin](/custom-sites/allowed-origins.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.selvette.com/custom-sites/product-references.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
