Image Loader for Android
Lightweight • Fast • Reliable • Easy to use
SORA is a lightweight Android image loading library built for API 21+. It is designed to load and render images efficiently with memory and disk caching, SVG support, smart resizing, request cancellation, and graceful fallback handling.
- Version:
1.0.6 - Distribution: JitPack
- Artifact:
com.github.EKITEAM:SORA:[Version]
- Multi-level caching with memory and disk support
- Network image loading over HTTP/HTTPS
- SVG rendering support
- Optional animated image support
- Smart resizing and downsampling
- Background loading on worker threads
- Request cancellation by tag or target
- Verification keys for recycled views
- Loading state observation via
ImageLoadObserver - Memory trimming support
- Placeholder and error drawables
- Minimum Android SDK: 21
- Target SDK: 34
- Java 8 or later
- Java 11 recommended
SORA is published through JitPack.
In settings.gradle:
dependencyResolutionManagement {
repositories {
mavenCentral()
maven { url 'https://jitpack.io' }
}
}If your project still uses the older Gradle setup, add JitPack in the root build.gradle repositories block instead.
dependencies {
implementation 'com.github.EKITEAM:SORA:[Version]'
}<uses-permission android:name="android.permission.INTERNET" />ImageLoader.with(context)
.load("https://example.com/image.jpg")
.placeholder(R.drawable.placeholder)
.error(R.drawable.error)
.resize(300, 300)
.into(imageView);ImageLoader.with(context)
.load(url)
.into(imageView, new ImageLoadObserver() {
@Override
public void onStateChanged(ImageLoadState state) {
if (state.getStatus() == ImageLoadState.Status.SUCCESS) {
// Image loaded successfully
} else if (state.getStatus() == ImageLoadState.Status.ERROR) {
LoadError error = state.getError();
// Handle error
}
}
});| Method | Description |
|---|---|
load(String url) |
Set the image URL (HTTP/HTTPS) |
placeholder(int resId) |
Drawable shown while loading |
error(int resId) |
Drawable shown on failure |
resize(int width, int height) |
Target dimensions for downsampling |
allowSvg(boolean) |
Enable or disable SVG decoding |
allowAnimated(boolean) |
Enable or disable animated drawable support |
memoryCache(boolean) |
Store in memory cache |
diskCache(boolean) |
Store in disk cache |
tag(Object tag) |
Group requests for cancellation |
verificationKey(String key) |
Help prevent recycled-view mismatches |
ImageLoader.with(context)
.load("https://example.com/avatar.svg")
.placeholder(R.drawable.ic_placeholder)
.error(R.drawable.ic_broken_image)
.resize(256, 256)
.allowSvg(true)
.allowAnimated(true)
.memoryCache(true)
.diskCache(true)
.tag("profile_screen")
.verificationKey("user_123_" + imageUrl)
.into(imageView);// Cancel by tag
imageLoader.cancelRequests("profile_screen");
// Cancel a specific target
imageLoader.cancel(imageView);
// Cancel all
imageLoader.cancelAll();// Clear memory cache
imageLoader.clearMemoryCache();
// Clear disk cache
imageLoader.clearDiskCache();
// Trim memory
imageLoader.trimMemory(level);| Method | Description |
|---|---|
pause() |
Pause all new requests |
resume() |
Resume processing |
shutdown() |
Shutdown the executor and clear caches |
trimMemory(int level) |
Forward Android trim-memory events |
| Status | Meaning |
|---|---|
IDLE |
No active request |
LOADING |
Request is in progress |
SUCCESS |
Image loaded successfully |
ERROR |
Loading failed |
CANCELED |
Request was canceled |
Additional fields and methods:
getUrl()— Original URLgetDrawable()— Resulting drawable on successgetError()—LoadErrorwith type and cause
NETWORK— Connection or timeout issuesDECODE— Failed to decode image dataSVG— SVG parsing failureHTTP— Non-200 response codeCANCELED— Explicit cancellationUNKNOWN— Any other exception
If you enable obfuscation, add these rules to proguard-rules.pro:
# SORA library
-keep class com.ekidevs.sora.** { *; }
-keepclassmembers class com.ekidevs.sora.** { *; }
# SVG library
-keep class com.caverock.androidsvg.** { *; }
By default, SORA sends:
Sora/`versionName`
The version matches the library versionName.
Contributions are welcome.
Please open an issue or submit a pull request: https://github.com/EKITEAM/SORA
For questions, bug reports, or feature requests: https://github.com/EKITEAM/SORA/issues
SORA is licensed under the Apache License 2.0.
See the LICENSE file for full details.
SORA — Light up your images.

