---
title: "RemoteImage"
description: "A composable that lays out and draws a given [RemoteImageBitmap]."
type: "composable"
---
## API Reference

### RemoteImage

> Source set: Android

```kotlin
@Composable
public fun RemoteImage(
    remoteBitmap: RemoteImageBitmap,
    contentDescription: RemoteString?,
    modifier: RemoteModifier = RemoteModifier,
    contentScale: ContentScale = ContentScale.Fit,
    alpha: RemoteFloat = DefaultAlpha.rf,
)
```

A composable that lays out and draws a given [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap/api). This is the remote equivalent
of `androidx.compose.foundation.Image`.

#### Parameters

| | |
| --- | --- |
| remoteBitmap | the [RemoteImageBitmap](/jetpack-compose/androidx.compose.remote/remote-creation-compose/classes/RemoteImageBitmap) to be drawn. |
| contentDescription | the Text used by accessibility services to describe what this image represents. |
| modifier | the [RemoteModifier](/jetpack-compose/androidx.compose.remote/remote-creation-compose/interfaces/RemoteModifier) to be applied to this layout node. |
| contentScale | the rule to apply to scale the image when its size does not match the layout size, Defaults to `ContentScale.Fit`. |
| alpha | the Optional opacity to be applied to the [remoteBitmap](#remotebitmap) when it is rendered. |

## Code Examples

### RemoteImageSample

```kotlin
@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteImageSample() {
    val remoteBitmap = rememberRemoteImageBitmap(url = "https://example.com/placeholder.png")
    RemoteImage(
        remoteBitmap = remoteBitmap,
        contentDescription = "Sample Remote Image".rs,
        modifier = RemoteModifier.size(100.rdp),
        contentScale = ContentScale.Crop,
    )
}
```

### RemoteImageFitSample

```kotlin
@Sampled
@PreviewWrapper(RemoteComponentPreviewWrapper::class)
@Composable
fun RemoteImageFitSample() {
    val remoteBitmap = rememberRemoteImageBitmap(url = "https://example.com/placeholder.png")
    RemoteImage(
        remoteBitmap = remoteBitmap,
        contentDescription = "Fit Sample".rs,
        modifier = RemoteModifier.size(100.rdp),
        contentScale = ContentScale.Fit,
    )
}
```
