---
title: image
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/uielements/image/image
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/uielements/image/image.md
last_updated: 2026-10-07
generated_at: 2026-11-04T06:55:22.568Z
locale: en-us
---

# image

> The texture to display in this image. If you assign a Texture or Texture2D, the Image element will resize and show the assigned texture.

## Definition

* **Type:** Property
* **Namespace:** [UnityEngine.UIElements](/engine/7000.0/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public Texture image { get; set; }
```

### Remarks

The following example creates an `Image` element and assigns a texture to it.

### Examples

```csharp
using UnityEngine;
using UnityEngine.UIElements;

public class AddImageExample : MonoBehaviour
{
    public Texture2D myTexture;    
    void OnEnable()
    {
        var root = GetComponent<UIDocument>().rootVisualElement;       
        var imageElement = new Image();
        imageElement.image = myTexture;        
        root.Add(imageElement);
    }
}
```
