> For the complete documentation index, see [llms.txt](https://docs.hello-lisa.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hello-lisa.com/developers/widgets/promo-widget/configuration-options/image-modifier.md).

# Image modifier

The optional imageModifier flag allows you to scale/crop the Promo Widget image.

```typescript
const alertConfig: Partial<AlertConfig> = {
  imageModifier: 'x512',
};
```

You can set the modifier to scale the image to a fixed width and height or to a fixed width or heigh, while preserving the original images aspect ratio.

Width and height values can be any numeric value between 1 and 9999. Values above 9999 are currently not supported.

### Image fit

When both a width and height are provided, the possible methods by which the image should fit these are:

200x200c — Preserving aspect ratio, contain within both provided dimensions using "letterboxing" where necessary.&#x20;

200x200f — Ignore the aspect ratio of the input and stretch to both provided dimensions.&#x20;

200x200i — Preserving aspect ratio, resizing the image to be as large as possible while ensuring its dimensions are less than or equal to both those specified.&#x20;

200x200o — Preserving aspect ratio, resize the image to be as small as possible while ensuring its dimensions are greater than or equal to both those specified.

If omitted, the default fit cover is applied, preserving aspect ratio, ensuring the image covers both provided dimensions by cropping/clipping to fit.

### Examples

480x854 — Fixed width (480px) and height (480px). Original image's aspect ratio ignored.&#x20;

480x854c — Fixed width (480px) and height (480px). Preserving aspect ratio, contain within both provided dimensions using "letterboxing" where necessary.&#x20;

480x — Fixed width (480px) while preserving the original image's aspect ratio.&#x20;

x854 — Fixed height (854px) while preserving the original image's aspect ratio.


---

# 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.hello-lisa.com/developers/widgets/promo-widget/configuration-options/image-modifier.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.
