---
id: "P:cAlgo.API.Image.Source"
kind: "property"
type: "T:cAlgo.API.Image"
url: "https://help.ctrader.com/ctrader-algo/references/Controls/Image/Source/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# Image.Source

Member of [Image](https://help.ctrader.com/ctrader-algo/references/Controls/Image/index.md).

## Source

Gets or sets the source of the image.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Accepted without error but never displayed, so control events such as Click are never raised.
- Cloud: Accepted without error but never displayed, so control events such as Click are never raised.

C#:

```csharp
public object Source {get; set;}
```

Python:

```python
image.Source: object
```

### Returns

`object` — 

### Examples

C#:

```csharp
var icon = new SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect width='16' height='16' fill='#2ECC71'/></svg>");
var image = new Image { Source = icon, Width = 24, Height = 24 };
Chart.AddControl(image);
Print("Source type: {0}", image.Source.GetType().Name);
```

Python:

```python
icon = SvgIcon("<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16'><rect width='16' height='16' fill='#2ECC71'/></svg>")
image = Image()
image.Source = icon
image.Width = 24
image.Height = 24
api.Chart.AddControl(image)
```

