# Image View

This content view is represented by `image` value for the field `type`.  The image for the image view can be sourced from a local source (as part of the App package) or from a remote source.  This is identified by the `sourceType` field value.  The image source is represented by the field `source`.

Following are the possible values of `sourceType` field:

* "remote" -- identifies that the source is a remote url
* "system" -- identifies that the source is a system icon (SF Symbol for iOS and Material Icon for Android)
* "dynamic" -- identifies that the source is a local application image path returned by `CustomContentDataProvider` object.
* default or absent sourceType field means that source is a local application image path

Following example shows a simplest image content view:

```json
{
      "type": "image",
      "source": "https://picsum.photos/id/1018/300/200.jpg",
      "sourceType": "remote"
}
```

### Image Scaling Mode

Image Content Views support scaling mode with the field `scalingMode`.  The `scalingMode` field can have the following values: &#x20;

* "scaledToFill" -- scales the image to fill its parent, maintaining it's aspect ratio
* "scaledToFit" -- scales the image to fit its parent, maintaining it's aspect ratio

### Scaling Dimensions

Apart from trying to fit or fill the image to its parent view, an image can be rendered to a specific width / height.  Appstent CMS supports adding `width` and/or `height` fields to the image view content.  As image's aspect ratio is always maintained, specifying width suffices in most cases.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://appversation.gitbook.io/appstent/content-authoring/individual-views/image-view.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
