Widgets
...
Promo Widget
Configuration options
Image modifier
3min
The optional imageModifier flag allows you to scale/crop the Promo Widget image.
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.
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.
- 200x200f — Ignore the aspect ratio of the input and stretch to both provided dimensions.
- 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.
- 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.
- 480x854 — Fixed width (480px) and height (480px). Original image's aspect ratio ignored.
- 480x854c — Fixed width (480px) and height (480px). Preserving aspect ratio, contain within both provided dimensions using "letterboxing" where necessary.
- 480x — Fixed width (480px) while preserving the original image's aspect ratio.
- x854 — Fixed height (854px) while preserving the original image's aspect ratio.