Add the codes below to your root build.gradle file (not your module-level build.gradle file):
allprojects {
repositories {
mavenCentral()
}
}Next, add the dependency below to your module's build.gradle file:
=== "Groovy"
```Groovy
dependencies {
implementation "com.github.skydoves:landscapist-glide:2.11.0"
}
```
=== "KTS"
```kotlin
dependencies {
implementation("com.github.skydoves:landscapist-glide:2.11.0")
}
```
!!! note
`Landscapist-Glide` includes version `4.15.1` of [Glide](https://github.com/bumptech/glide) internally. So please make sure your project uses the same Glide version or exclude the Glide dependency to adapt yours. Also, please make sure the Jetpack Compose version on the [release page](https://github.com/skydoves/Landscapist/releases).
You can load images simply by using GlideImage composable function as the following example below:
GlideImage(
imageModel = { imageUrl }, // loading a network image using an URL.
imageOptions = ImageOptions(
contentScale = ContentScale.Crop,
alignment = Alignment.Center
)
)According to the Compose Compiler Metrics, the GlideImage Composable function is marked as Restartable and Skippable. This means you don't have to worry about performance issues related to re-rendering or re-fetching problems that can occur during recomposition. The Composable function's restartable and skippable nature ensures that the necessary actions are taken to optimize rendering, making it more efficient and seamless.

