Value Type

If nothing else is specified, selected images will be returned as instances of Skybrud.ImagePicker.Models.Image. However if another model is more desired, a custom type can be set via the Value type option in the data type configuration.

The option lets you pick any .NET type that has a public constructor, and the first parameter is of the type IPublishedContent. If a constructor has any additional parameters, the package will try resolving their values via dependency injection.

If the second parameter is of type Skybrud.ImagePicker.PropertyEditors.ImagePickerConfiguration, the configuration of the data type will also be supplied to the model.

image