Image

Image Component

NameDefaultPossible valuesDescription
Typefluidfluid, none`The type of image to apply dedicated styling
WidthPositive IntegerThe requested width in pixel
HeightPostiive IntegerThe requested height in pixel
Rationumber:numberThe requested ratio (Most common: 21:9,16:9, 4:3, 1:1)

Transformation Properties

NameDefaultPossible valuesDescription
Fitcovercover, contain, fill, inside, outsideHow the image should fit the box defined by width and height
Compressionmidlow, mid, high, max, noneA compression preset for raster image

More:

  • A fluid image will scale down to fit the container, maintaining the aspect ratio.
  • Fit explanation

Features

  • No image stretch: final width and height values never go above the image intrinsic size.
  • Automatic compression
  • Responsive by default
  • Ratio support
  • Fallback image
  • Crop support with fit attribute

Error handling

Image Component Error

Example of image component error

In case of a bad input in the image component:

  • the default fallback image is show en with the error title
  • and the image description (alt attribute) get the exact error.

Example of Image that will show an error:

markdown
<Image src="card_puncher_data_processing.jpg"
alt="Card Puncher"
width="-1"
/>
  • For a image error that is created by:

Transformation Service Error

In case of error, the transformation service will:

  • send back the default fallback image
  • with the exact error in the http headers X-Interact-Image-Handler-Error

Example of img element that will show an error:

html
<img src="_images/does-not-exist.jpg" alt=""/>

Responsive Image

Dpi Correction

Mobile have a higher DPI and can then fit a bigger image on a smaller size.

You can enable DPI correction for responsive image.

This can be disturbing when debugging responsive sizing image If you want also to use less bandwidth, this is also useful.

Compression

LevelQuality LevelDescription
noneNo compression applied; original image data is preserved exactly as-is
low90Minimal compression with negligible quality loss; best for archival or print use
mid80Balanced compression reducing file size by ~50% with minimal visible quality impact
high60Aggressive compression prioritizing small file size over image fidelity
max40Maximum compression; significantly reduced quality, optimized for bandwidth-constrained environments