coil-compose

Implements image loading in Compose Multiplatform apps using Coil 3 APIs.

1|Updated Jun 1, 2026
One-click install
npx skills add https://github.com/chmonya-inc/dnd-manager --skill coil-compose-chmonya-inc
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: coil-compose
Source: https://github.com/chmonya-inc/dnd-manager/tree/main/.agents/skills/coil-compose
Command: npx skills add https://github.com/chmonya-inc/dnd-manager --skill coil-compose-chmonya-inc

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Loading images in Compose and Compose Multiplatform apps involves choosing between AsyncImage, SubcomposeAsyncImage, and rememberAsyncImagePainter, and misusing them causes memory waste, scroll jank, and KMP compile errors. ## Core Features & Use Cases - API Selection Guidance: Explains when to use AsyncImage, SubcomposeAsyncImage, or rememberAsyncImagePainter with concrete decision criteria. - Performance Patterns: Covers size inference, placeholder/error states, and why SubcomposeAsyncImage must be avoided inside LazyColumn or LazyRow. - KMP Setup: Shows LocalPlatformContext usage, singleton ImageLoader configuration, and coil-compose vs coil-compose-core dependency choices. - Use Case: When building a Kotlin Multiplatform app with image-heavy lists, apply the RIGHT vs WRONG patterns to avoid loading full-resolution bitmaps and causing OOM crashes. ## Quick Start Show me how to load a network image with Coil 3 in my Compose Multiplatform app with a placeholder and crossfade.

Frequently Asked Questions about coil-compose

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I load images in Compose with Coil 3?▼

Use AsyncImage with an ImageRequest built from LocalPlatformContext.current, passing the URL via .data() and enabling .crossfade(true). Add placeholder and error painter parameters for loading and failure states.

AsyncImage vs SubcomposeAsyncImage vs rememberAsyncImagePainter?▼

Use AsyncImage for standard cases since it infers size from layout constraints. Use rememberAsyncImagePainter only when a Painter is required, with explicit .size(). Reserve SubcomposeAsyncImage for custom state composables, never in lists.

Does Coil 3 work with Kotlin Multiplatform?▼

Yes, Coil 3 is fully multiplatform with identical AsyncImage APIs in commonMain. Use LocalPlatformContext.current instead of LocalContext.current, and add coil-compose or coil-compose-core plus a network engine like coil-network-ktor3.

Why does rememberAsyncImagePainter cause high memory usage?▼

rememberAsyncImagePainter does not infer display size from layout constraints, so without an explicit .size() it loads images at original dimensions. A 4000x3000 photo shown at 64dp still occupies the full bitmap in memory.

Why is SubcomposeAsyncImage slow in LazyColumn?▼

SubcomposeAsyncImage creates a subcomposition per item, which is significantly slower than regular composition. During scrolling this overhead accumulates and causes jank, so use AsyncImage with placeholder and error parameters instead.