New in 1.50.0

configureCropAspectRatios(cropAspectRatios)

Defines custom image cropping aspect ratios for use in Scrivito’s image editor.

Scrivito’s built-in image editor provides a set of predefined crop aspect ratios to choose from. If custom aspect ratios are configured, they replace the built-in ones.

Params

  • cropAspectRatios(Array) – the image crop aspect ratios to be made available in the image editor. Each item must be an object with the following properties:
    • title (String) – the label of the crop aspect ratio button. 
    • aspectRatio (Number) – the aspect ratio.

Example

The default configuration: