ImageBlock
The ImageBlock is a simple banner to display an image. The ImageBlock can either be used standalone or embedded into a grid wrapper.
Structure examples
Take a look at some examples, to further understand the configuration options to display an ImageBlock.
- Normal image
- Fullscreen width
- Fullscreen height
- Whole screen
{
"image":{
"url":"https://my-image-url.png",
"altText":"alt text"
},
"styleOptions":{
"maxHeight":"450px",
"isFullWidth":true
}
}Create
POST _apiBaseUrl/v1/cms/banner/image-blockCode
ImageBlockDto{
"image":{
"url":"https://my-image-url.png",
"altText":"alt text"
},
"styleOptions":{
"baseWidth": null,
"minHeight":"400px",
"maxHeight":"600px",
"isFullWidth":"100%",
"isScreenWidth":true,
"isScreenHeight": false,
"position":"center"
}
}Arguments
Data directly related to the image.
Optional style options to further customize the image block. Focusing on the size and placement of it.
The base width, the image tries to resize to, if possible.
Min height of the image. Allows all possible css sizes.
Sets image block to full width, omitting the default padding.
Sets the image block to screen height.
Max height value allows all possible css sizes.
As the image is set to fill when having a max height or is screen width/height, the image position can also be defined. The value can either be a fixed alignment value like top, bottom... or a more specific value like '50% 100%'
Stretches the image width to 100% of the parents' container.