---
schema_version: "1"
id: b0a2bd430f4271e1be9cada76c0a9a252515edc1bfbe5a205cf88d27e060020b
title: SalesforceAsyncImage
collection: developer
version: current
locale: en-us
portal_url: https://docs.salesforce.com/developer/current/en-us/genai/agentforce-mobile-sdk/references/android/image-components-android.md
canonical_url: https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/image-components-android.html
source_site: developer.salesforce.com
content_type: documentation
content_hash: afe3a7a76d3311875b2d270ae46a4cd2634409895d4d2b4ef29526363ff30644
products:
  - Agentforce Mobile SDK
  - Agentforce and Einstein Generative AI
---
# SalesforceAsyncImage

`@Composable fun SalesforceAsyncImage`

Salesforce Coil's AsyncImage

## Function

```kotlin
@Composable
fun SalesforceAsyncImage(
    data: Any?,
    @DrawableRes placeHolderDrawableResId: Int = 0,
    @DrawableRes errorDrawableResId: Int = 0,
    @DrawableRes fallbackDrawableResId: Int = 0,
    contentScale: ContentScale = ContentScale.Fit,
    imageContentDescription: String? = null,
    tintColor: Color? = null,
    modifier: Modifier = Modifier
)
```

## Parameters

| Parameter                  | Type           | Description                                                                                                                                                        |
| -------------------------- | -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `data`                     | `Any?`         | Set the data to load. The default supported data types are: String (mapped to a Uri), Uri, HttpUrl, File, DrawableRes, Drawable, Bitmap, ByteArray, ByteBuffer     |
| `placeHolderDrawableResId` | `Int`          | Set the placeholder drawable to use when the request starts                                                                                                        |
| `errorDrawableResId`       | `Int`          | Set the error drawable to use if the request fails                                                                                                                 |
| `fallbackDrawableResId`    | `Int`          | Set the fallback drawable to use if data is null                                                                                                                   |
| `contentScale`             | `ContentScale` | Optional scale parameter used to determine the aspect ratio scaling to be used if the bounds are a different size from the intrinsic size of the AsyncImagePainter |
| `imageContentDescription`  | `String?`      | ContentDescription for the AsyncImage                                                                                                                              |
| `tintColor`                | `Color?`       | Tint color for the AsyncImage                                                                                                                                      |
| `modifier`                 | `Modifier`     | Modifier for the compose view                                                                                                                                      |

## Related Documentation

- [AgentforceAttachment](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/android/agentforce-attachment-android.md)
- [AgentforceMessage](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/android/agentforce-message-android.md)
- [AgentforceConversation](https://developer.salesforce.com/docs/ai/agentforce-mobile-sdk/references/agentforce-mobile-sdk/agentforce-conversation-android.md)
