image is a inline component that permits to show raster or svg images from your media library in your pages.
All images:
ComboStrap supports:
ComboStrap uses:
{{[ ]path?WxH&ratio=w:h&nolink&att=value[ ]}}
where:
To resize to a given width, add a number.
Example of an image resized to 400px
{{:docs:block:stock_image_surfer_in_the_see.png?400|}}
Raster images are automatically resized below the screen size. For more information, see the Raster - Automatic Resizing feature
To resize to a given height, set a width to 0 followed by the height.
Example of an image resized to 250px height
{{:docs:block:stock_image_surfer_in_the_see.png?0x250|}}
cropping can be defined by setting the following properties:
cropping works on:
First, the image is scaled down by height and is then cropped on the width towards the center.
Example:
{{:docs:block:stock_image_surfer_in_the_see.png?200x200|}}
{{:docs:block:stock_image_surfer_in_the_see.png?200&ratio=1:1|}}
{{:docs:block:stock_image_surfer_in_the_see.png?ratio=4:3|}}
{{:undraw_content_creator.svg?0x200&ratio=16:9|}}
Example: position the image to the right with:
{{ :docs:block:stock_image_surfer_in_the_see.png?300&spacing=p-3&background-color=white|}}
If you want more control on position, we advise you to use the grid and its cells.
You can style even further your image with styling element:
For instance, to elevate this photography with a surfer, you could use this syntax.
{{ :docs:block:stock_image_surfer_in_the_see.png?400&onHover=float&shadow=lg |}}
You can also use the image as background.
<slide color="steelblue" align="text-center" >
<background opacity="0.3">{{:docs:block:stock_image_surfer_in_the_see.png|}}</background>
<heading d2>A background image</heading>
<text lead font-size="h3">A background image will emphasise a short message.</text>
</slide>
With the carroussel component, you can create an image gallery
<carrousel>
{{ :woman-yoga-sunset.jpg?0x600&ratio=16:9 |}}
{{ :page_speed_performance.png?0x600&ratio=16:9 |}}
{{ :undraw_content_creator.svg?0x600&ratio=16:9 |}}
</carrousel>
This configuration permits to disable completely this component. It will also disable:
This configuration permits setting the link type to the image.
Value | Behavior |
---|---|
default | The default value is direct |
direct | Direct link to the image in a lightbox |
detail | Link to a web page with image details |
linkonly | Only the link is displayed, not the image |
nolink | No link is added around the image |
You can also add image in the metadata in order to add/set illustrations for social cards or templates.