coil-compose

Load URL images in Jetpack Compose with Coil's AsyncImage.

1|2|Updated Jan 25, 2026
One-click install
npx skills add https://github.com/jhparktime/OnGuard --skill coil-compose-jhparktime
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: coil-compose
Source: https://github.com/jhparktime/OnGuard/tree/main/.claude/skills/coil-compose
Command: npx skills add https://github.com/jhparktime/OnGuard --skill coil-compose-jhparktime

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Loading images in Jetpack Compose from URLs can be verbose and error-prone without a dedicated image loader; Coil provides a robust solution with caching, placeholders, and transitions to improve UX.

Core Features & Use Cases

  • Async image loading with Coil's AsyncImage and ImageRequest
  • State handling for loading, success, and error states
  • Low-level control with rememberAsyncImagePainter for custom use cases
  • Performance best practices: single ImageLoader, crossfade, and sizing considerations
  • Use Case: displays a profile image from a URL with a circular crop and fallback placeholder

Quick Start

Use this skill to implement Coil-based image loading in a Compose UI by starting with AsyncImage and then tailor placeholders and error handling to your design.

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 from a URL in Jetpack Compose?

Load images from a URL in Jetpack Compose by using Coil's AsyncImage composable. AsyncImage handles the image request, caching, and display lifecycle automatically, reducing boilerplate and preventing common loading errors.

How do I show a placeholder and handle errors with AsyncImage?

Show placeholders and handle errors in AsyncImage by configuring the ImageRequest. You can define fallback composables for loading and error states, ensuring a smooth user experience when network requests fail or delay.

When should I use rememberAsyncImagePainter instead of AsyncImage?

Use rememberAsyncImagePainter instead of AsyncImage when you need low-level control over the image loading process. It provides a painter instance for custom drawing logic, advanced animations, or specialized layout requirements beyond standard image display.

What is the best way to configure Coil for performance in Compose?

Configure Coil for performance in Compose by maintaining a single ImageLoader instance and applying crossfade transitions. Proper crossfade configuration and sizing considerations prevent unnecessary memory allocation and ensure smooth scrolling.

Can I observe loading states like success and error with Coil in Compose?

Yes, you can observe loading states with Coil in Compose. The image loading process exposes distinct loading, success, and error states, allowing you to trigger custom UI updates, animations, or fallback logic based on the fetch result.

Does Coil support image transformations like circular cropping in Compose?

Yes, Coil supports image transformations like circular cropping in Compose. You can apply these transformations within the ImageRequest to display profile images from a URL with specific shapes and fallback placeholders.