Member-only story
HomeMade ImageLoading Library for KMP from Scratch — Part 1
As a developer working on Kotlin Multiplatform (KMP) projects, you’re likely familiar with the challenges of loading images across various platforms. In this series, we’ll delve into designing an image-loading library specifically tailored for KMP projects from scratch.
Feature in Kotlin Weekly-420

Don’t miss out on my course on Generative AI using Kotlin, Jetpack Compose, Langchain4j, and Ollama. You will learn hands-on by building 6 AI apps. Join now for lifetime access, but hurry — You might miss early bird discount!
Creating a new KMP Project
This project will be targeting multiple platforms, including Android, iOS, desktop, and web applications using Wasm. To create a new project visit KMP Wizard,
We are using the project name — Kodak-KMP
and project ID dev.ch8n.kodak

From Setup wizard form select the following project targets :
1. Android — With Compose Multiplatform UI framework based on Jetpack Compose
2. IOS — Share UI (with Compose Multiplatform UI framework)
3. Desktop — With Compose Multiplatform UI framework
4. Web — With Compose Multiplatform UI framework powered by Kotlin/Wasm
Then download
and extract the zip and open it in Android Studio
or IntelliJ
, for this article, I’m using the IntelliJ community edition
.
Library Functional Requirement
We’re aiming to build an image-loading library for KMP that meets the following key functional requirements:
- Asynchronous Image Loading from URL: We need to be able to load images from URLs without blocking the main thread.
- Compatibility with Jetpack Compose: The library should seamlessly integrate with Jetpack Compose, ensuring a smooth and efficient user experience.