- Description:
This key defines how image files are resized prior to upload, using a bounding box defined by
widthandheightoptions.Valid values are
cover,contain,crop, orstretch:coverkeeps aspect ratio and ensures the image covers the bounding boxcontainkeeps aspect ratio and ensures the image fits inside the bounding boxcropprompts the user with and interface to select an aspect-ratio-respecting areastretchignores aspect ratio and resizes the image to the bounding box
This key does not apply to existing images, and does not work if
widthandheightoptions are not defined.- Appears in:
├── _inputs │ └── * │ ├── Rich Text Input │ │ └── options │ │ └── resize_style │ ├── File Input │ │ └── options │ │ └── resize_style │ └── URL Input │ └── options │ └── resize_style └── _editables ├── content │ └── resize_style ├── block │ └── resize_style └── image └── resize_style- Type:
string- Default value:
contain- Allowed values:
covercontainstretchcrop- Examples:
In this example, we have configured an Image Input to resize images using the
coverstyle to ensure images cover the bounding box while maintaining aspect ratio.Copied to clipboard_inputs: hero_image: type: image options: width: 1200 height: 600 resize_style: cover{ "_inputs": { "hero_image": { "type": "image", "options": { "width": 1200, "height": 600, "resize_style": "cover" } } } }