coil README

The project's README from github.com/coil-kt/coil. As one markdown file: README.md.

Coil

An image loading library for Android and Compose Multiplatform. Coil is:

Coil is an acronym for: Coroutine Image Loader.

Translations: 日本語, 한국어, Русский, Svenska, Türkçe, 中文, پارسی, O'zbekcha

Quick Start

Import the Compose library and a networking library:

implementation("io.coil-kt.coil3:coil-compose:3.6.2")
implementation("io.coil-kt.coil3:coil-network-okhttp:3.6.2")

To load an image, use the AsyncImage composable:

AsyncImage(
    model = "https://example.com/image.jpg",
    contentDescription = null,
)

Check out Coil's full documentation here.

License

Copyright 2026 Coil Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

coil (coil-kt/coil)

Searching Database…

11.9K ·GitHub
这是什么?Coil 是一个图片加载库,适用于 Android 和 Compose Multiplatform,基于 Kotlin 协程构建。它负责图片的获取、解码、缓存和显示,只需极少的样板代码。
它是独立应用,还是我要添加到项目中的库?它是一个库,需要作为依赖添加到 Kotlin/Compose 项目中,而不是独立应用。“Coil” 是 Coroutine Image Loader 的缩写。
如何将它添加到项目中?导入 Compose 库和一个网络库,然后使用 AsyncImage 可组合函数加载图片。
除了 Kotlin,还需要其他东西才能使用它吗?Coil 只依赖 Kotlin、Coroutines 和 Okio,另外还需要一个网络库(如 OkHttp 或 Ktor)来获取远程图片。
它只能在 Android 上使用,还是也支持其他 Compose 平台?它既支持 Android,也支持 Compose Multiplatform,因此并不局限于 Android 应用。
Coil 为什么快?Coil 进行了多项优化,例如内存缓存和磁盘缓存、图片降采样,以及自动暂停或取消不再需要的请求。
为什么叫 Coil?Coil 是 Coroutine Image Loader 的缩写,体现了它以 Kotlin 为先、基于协程的设计理念。
它能和其他现代 Android 库一起使用吗?可以,它的设计就是开箱即用地与 Compose、Coroutines、Okio、OkHttp 和 Ktor 协同工作。
有其他语言的文档吗?有,README 已翻译成日语、韩语、俄语、瑞典语、土耳其语、中文、波斯语和乌兹别克语。
Creator
coil-kt
Size
126.6 MB
Stars
11.9K
Age
7y
Commits · 90 Days