{"id":28600737,"url":"https://github.com/solkin/simple-image-loader","last_synced_at":"2025-06-11T14:38:52.005Z","repository":{"id":148039400,"uuid":"427043060","full_name":"solkin/simple-image-loader","owner":"solkin","description":"🖼️ Modern image loading library for Android. Simple by design, powerful under the hood.","archived":false,"fork":false,"pushed_at":"2024-10-21T18:19:23.000Z","size":2497,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-10-22T09:44:31.702Z","etag":null,"topics":["android","fast","flexible","image-loader","kotlin","kotlin-library","lightweight","simple","simple-api"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/solkin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-11T15:06:11.000Z","updated_at":"2024-10-21T18:19:27.000Z","dependencies_parsed_at":"2024-01-08T14:53:36.733Z","dependency_job_id":"69dc3350-b2a4-4f36-bf37-acf0e0d08b9a","html_url":"https://github.com/solkin/simple-image-loader","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solkin%2Fsimple-image-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solkin%2Fsimple-image-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solkin%2Fsimple-image-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solkin%2Fsimple-image-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/solkin","download_url":"https://codeload.github.com/solkin/simple-image-loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/solkin%2Fsimple-image-loader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259280890,"owners_count":22833473,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","fast","flexible","image-loader","kotlin","kotlin-library","lightweight","simple","simple-api"],"created_at":"2025-06-11T14:38:50.800Z","updated_at":"2025-06-11T14:38:51.938Z","avatar_url":"https://github.com/solkin.png","language":"Kotlin","readme":"# Simple Image Loader [![](https://jitpack.io/v/solkin/simple-image-loader.svg)](https://jitpack.io/#solkin/simple-image-loader)\n\nModern image loading library for Android. Simple by design, powerful under the hood.\n\n- **Kotlin**: Simple Image Loader is Kotlin-native and uses no any dependencies except myself [Disk LRU Cache](https://github.com/solkin/disk-lru-cache)\n- **Fast**: contains lots of optimizations: memory cache, disk cache, images downsampling, requests cancelling and more\n- **Lightweight**: ~18Kb 😄\n- **Simple**: minimal boilerplate, simple API, based on every-day needs, extensible for features you need\n- **Flexible**: not found something you need, like need FTP transport, maybe custom memory or disk caching, SVG displaying support, etc? You can easily add it on your project, because Simple Image Loader is modular and full of simple abstractions.\n\n![GifDemo](/art/simple-image-loader-demo.gif)\n\n## Gradle\n\nStep 1. Add this in your root `build.gradle`\n\n```\n    allprojects {\n        repositories {\n            maven { url 'https://jitpack.io' }\n        }\n    }\n```\n\nStep 2. Add the dependency\n\n```\n    dependencies {\n        compile 'com.github.solkin:simple-image-loader:VERSION'\n    }\n```\n\nIf you like to stay on the bleeding edge, or use certain commit as your dependency, you can use the short commit hash or anyBranch-SNAPSHOT as the version.\n\n## Demo\n\nPlease see the demo app for library usage example.\n\n## Quick Start\n\nTo load an image into an `ImageView`, use the `load` extension function:\n\n```kotlin\n// URL\nimageView.load(\"https://www.example.com/image.jpg\")\n\n// File\nimageView.load(\"file:///path/to/image.jpg\")\n\n// Asset\nimageView.load(\"file:///android_asset/image.jpg\")\n\n// Content\nimageView.load(\"content://media/external_primary/images/media/90\")\n```\n\nRequests can be configured with an optional trailing lambda:\n\n```kotlin\nimageView.load(\"https://www.example.com/image.jpg\") {\n    centerCrop()\n    withPlaceholder(R.drawable.ic_placeholder)\n    whenError(R.drawable.ic_error, redColor)\n}\n```\n\nAlso, you can add options by creating extension functions:\n\n```kotlin\nfun Handlers\u003cImageView\u003e.centerInside() = apply {\n    successHandler { viewHolder, result -\u003e\n        with(viewHolder.get()) {\n            setImageDrawable(null)\n            scaleType = ImageView.ScaleType.CENTER_INSIDE\n            colorFilter = null\n            setImageDrawable(result.getDrawable())\n        }\n    }\n}\n```\n\n#### Image Loader\n\n`imageView.load` uses the singleton `SimpleImageLoader`. The singleton `SimpleImageLoader` can be accessed using an extension function:\n\n```kotlin\nval imageLoader = context.imageLoader()\n```\n\nTo configure custom singleton `SimpleImageLoader`, run `context.initImageLoader` prior to another calls and change any module you need:\n\n```kotlin\nval imageLoader = context.initImageLoader(\n    decoders = listOf(BitmapDecoder()),                     // Maybe, you need extraordinary images decoders?\n    fileProvider = FileProviderImpl(\n        cacheDir,\n        DiskCacheImpl(                                      // LRU disk cache for your images\n            DiskLruCache.create(cacheDir, 15728640L)\n        ),\n        UrlLoader(),                                        // vararg; http/https scheme support\n        FileLoader(assets),                                 // vararg; file scheme support\n        ContentLoader(contentResolver)                      // vararg; content scheme support\n    ),\n    memoryCache = MemoryCacheImpl(),                        // Caching images on memory\n    mainExecutor = MainExecutorImpl(),                      // Simple executor for main thread\n    backgroundExecutor = Executors.newFixedThreadPool(10)   // Executor service for background operations\n)\n```\n\n## Requirements\n\n- Min SDK 14+\n- [Java 8+](https://coil-kt.github.io/coil/getting_started/#java-8)\n\n## R8 / Proguard\n\nSimple Image Loader doesn't require adding any extra rules.\n\n## License\n    MIT License\n\n    Copyright (c) 2021 Igor Solkin\n\n    Permission is hereby granted, free of charge, to any person obtaining a copy\n    of this software and associated documentation files (the \"Software\"), to deal\n    in the Software without restriction, including without limitation the rights\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n    copies of the Software, and to permit persons to whom the Software is\n    furnished to do so, subject to the following conditions:\n\n    The above copyright notice and this permission notice shall be included in all\n    copies or substantial portions of the Software.\n\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n    SOFTWARE.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolkin%2Fsimple-image-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsolkin%2Fsimple-image-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsolkin%2Fsimple-image-loader/lists"}