Data Types

UploadWidgetEditor

Image editor options for the Upload Widget.

Structure

{
"crop": Boolean,
"cropRatio": Number,
"cropShape": String
}
}

Example

{
"images": {
"crop": true,
"cropRatio": 1,
"cropShape": "circ"
}
}

Properties

images.crop

Enables/disables the image cropper.

Default: true

Type: Boolean

Required: No

images.cropRatio

Crop aspect ratio as W/H.

For example, for a 16:9 widescreen aspect ratio use 1.778 (i.e. 16/9).

If unspecified and rect is used for cropShape, then does not enforce an aspect ratio (i.e. allows freeform cropping).

If unspecified and circ is used for cropShape, then uses a 1:1 aspect ratio. Only 1:1 is supported for circ.

Type: Number

Example: 1

Required: No

images.cropShape

The crop shape to use.

If "circ" is specified, then the resulting image will still be rectangular. You are expected to crop the image when displaying it via a border-radius: 50% CSS property. This provides sharper image edges, and also provides the greatest level of flexibility, e.g. if you decide to display square images in future.

Default: "rect"

Type: String

Allowed Values: "circ", "rect"

Required: No

Used by

Was this section helpful? Yes No

You are using an outdated browser.

This website requires a modern web browser -- the latest versions of these browsers are supported: