bumptech/glide
 Watch   
 Star   
 Fork   
5 days ago
glide

Glide 5.0.10

Glide 5.0.10 & Compose / KTX 1.0.0-beta11 Release Notes

Includes all public changes since v5.0.9 (PR #5721, 2026-07-10).

Security

  • HttpUrlFetcher: Strip sensitive request headers (Authorization, Proxy-Authorization, Cookie, Cookie2) on cross-origin HTTP redirects by default when handling redirects manually. Can be configured via GlideBuilder.experimentalSetStripSensitiveHeadersOnCrossOriginRedirects(boolean).

Bug Fixes

  • GlideException: Prevent a NullPointerException (rethrown as CallbackException) in GlideException.printStackTrace() when logging a failed load whose cause list contains null.
  • UriBitmapImageDecoderResourceDecoder MIME & OS guards:
    • Reject non-image URIs (such as videos and GIFs) in UriBitmapImageDecoderResourceDecoder.handles() via a positive image/* MIME type check so non-image content URIs are not passed to ImageDecoder.
    • Restrict UriBitmapImageDecoderResourceDecoder to Android 15+ (API 35+) to avoid native container descriptor race conditions on older OS versions.
  • ImageDecoder decode fallback: Catch DecodeException and IOException in BitmapImageDecoderResourceDecoder.decode() and return null so DecodePath falls back cleanly to Downsampler and other registered decoders instead of failing the load.
  • Active resource release race (#5782): Add GlideBuilder.experimentalSetEnableActiveResourceReleaseRaceFix(boolean) so Engine.load() skips active resources whose reference count has already dropped to zero, preventing IllegalStateException: Cannot recycle a resource while it is still acquired.
  • RGB_565 allocation size (#4490, #4461): Add GlideBuilder.experimentalSetEnableRgb565DownsamplerFix(boolean) to fix allocating twice the required memory when downsampling RGB_565 bitmaps.
  • In-memory models passed via load(Object): Add GlideBuilder.experimentalSetUseTypedLoadForInMemoryObjects(boolean) so RequestBuilder.load(Object) delegates to the typed load(Bitmap), load(Drawable), and load(byte[]) overloads when the runtime model is one of those types, applying the expected default disk/memory cache strategies (e.g. from Compose GlideImage).

Features & Performance

  • Direct file-descriptor ImageDecoder support (Android 10+): Add ParcelFileDescriptorBitmapImageDecoderResourceDecoder and AssetFileDescriptorBitmapImageDecoderResourceDecoder behind GlideBuilder.setPrioritizeFileDescriptorOverInputStream(boolean) (used alongside setImageDecoderEnabledForBitmaps(true)), prioritizing ParcelFileDescriptor and AssetFileDescriptor ModelLoaders over InputStream ModelLoaders and decoding directly from file descriptors without buffering streams on the Java heap. Also allows frame(0) requests on still images to use ImageDecoder.
  • Stream fallback when ImageDecoder is enabled: Add GlideBuilder.setUseBitmapFactoryForInputStreamsWithImageDecoder(boolean) so InputStream sources decode incrementally via BitmapFactory (StreamBitmapDecoder) instead of buffering the entire stream into a contiguous ByteBuffer, avoiding OutOfMemoryError on large images while keeping ImageDecoder for in-place sources (File, ParcelFileDescriptor, AssetFileDescriptor, Uri, ByteBuffer).
  • EXIF orientation & minimum target size in ImageDecoder: Add GlideBuilder.setRespectExifOrientationInImageDecoder(boolean) to inspect EXIF orientation ahead of decode and select ALLOCATOR_SOFTWARE when rotation is required (avoiding hardware bitmap GPU readbacks), while clamping ImageDecoder.setTargetSize dimensions to at least 1px on extreme aspect ratios.
  • Fast-path URI extension check: Check file extensions from URI path segments in UriBitmapImageDecoderResourceDecoder.handles() before falling back to ContentResolver.getType(uri), avoiding synchronous Binder IPC for standard image URIs.
  • Bypass transformations for HARDWARE bitmaps: Add Downsampler.BYPASS_TRANSFORMATIONS_FOR_HARDWARE_BITMAPS (effective when Downsampler.ALLOW_HARDWARE_CONFIG is enabled) so display-only layouts where the target ImageView handles scaling/cropping can skip software-canvas bitmap transformations when the decoded resource is Bitmap.Config.HARDWARE.
  • Bypass resource disk cache for HARDWARE bitmaps: Add GlideBuilder.setBypassResourceDiskCacheForHardwareBitmaps(boolean) to skip compressing Bitmap.Config.HARDWARE resources into the resource disk cache, avoiding RenderThread GPU readbacks and transient software bitmap copies on decode threads.
  • Disk cache path-name memoization disabled by default: Disable eager File path-name memoization by default in DiskLruCacheWrapper / DiskLruCache to reduce retained heap memory for large disk caches.
  • Background memory trimming on TRIM_MEMORY_UI_HIDDEN: Add GlideBuilder.experimentalSetEnableTrimMemoryOnUiHidden(boolean) so setMemoryCategoryInBackground(MemoryCategory) also applies when the app transitions to ComponentCallbacks2.TRIM_MEMORY_UI_HIDDEN.
  • Unlimited source executor configuration: Add GlideBuilder.setSourceUnlimitedExecutor(GlideExecutor) and GlideExecutor.newUnlimitedSourceBuilder() to allow customizing UncaughtThrowableStrategy and thread pool parameters for unlimited source loads.

Integrations & Submodules

  • Compose (1.0.0-beta11):
    • Add GlideBuilder.experimentalSetClearGlidePainterOnStop(boolean) so GlidePainter clears active requests and releases Bitmap/Drawable references when the host LifecycleOwner moves below STARTED (ON_STOP), automatically restarting on ON_START.
    • Update required Java/JVM target version for :integration:compose to Java 11.
  • KTX (1.0.0-beta11):
    • Bump version to 1.0.0-beta11 alongside :integration:compose.
  • Cronet:
    • Add opt-in ChromiumUrlLoader.Options.Builder#setGuardActiveJobEviction(boolean) to verify job identity before evicting an active URL entry on asynchronous cancellation/completion callbacks.
    • Downgrade expected Cronet network request failure logs in ChromiumRequestSerializer from ERROR to WARN.
  • Concurrent (futures):
    • Replace restricted CallbackToFutureAdapter / AbstractResolvableFuture usage in GlideFutures with a custom AbstractFuture implementation, propagate synchronous submit() exceptions through the returned ListenableFuture, and drop the unused androidx.concurrent:concurrent-futures dependency.
  • DiskLruCache:
    • Add single-value convenience overloads DiskLruCache.open(directory, appVersion, maxSize) and Value.getFile(), and remove legacy multi-value entry complexity.

Internal Cleanup & Build / Dependency Updates

  • Narrow internal Engine, ActiveResources, Jobs, EngineJob, and EngineResource tracking keys from Key to EngineKey, standardize engine field ordering, remove unreachable pre-API 23 branches (minSdkVersion is 23), remove Util.setSdkVersionInt, fix Javadoc compilation warnings, clean up redundant @SuppressWarnings, and annotate builder/registry mutators with @CanIgnoreReturnValue.
  • Configure Renovate automergeType to pr and rebaseWhen to conflicted.
  • Dependency updates: Kotlin 2.4.20, KSP 2.3.14, Compose 1.12.1, androidx.appcompat 1.8.0, androidx.fragment 1.9.1, androidx.lifecycle 2.11.0, androidx.annotation 1.11.0, dagger 2.60.1, androidx.test:core 1.7.0, androidx.junit 1.3.0, androidx.espresso 3.7.0, androidx.benchmark 1.5.0-rc01, and com.google.truth 1.4.5.

Full Changelog: https://github.com/bumptech/glide/compare/v5.0.9...v5.0.10

2026-07-11 10:23:29
glide

v.5.0.9

What's Changed

Full Changelog: https://github.com/bumptech/glide/compare/v5.0.8...v.5.0.9

2026-07-11 10:23:29
glide

Glide v5.0.9

Removed extra . from version name.

2026-07-11 08:33:06
glide

Glide v5.0.8

Compose

N/A

KTX

N/A

Build Changes

  • Upgrade Glide build system to Gradle 9.4.1, AGP 8.8.0, and Kotlin/KSP 2.0.20, resolving various build and test compatibility issues.
  • Bump Glide compileSdkVersion to 37 and Robolectric to 4.16.1.
  • Bump Glide minSdkVersion to 23 to match AndroidX requirements.
  • Restore deterministic module sorting in Glide annotation processors to improve build reproducibility (Fixes #5657).
  • Fix Javadoc style issue in setMemoryCategoryInBackground that was breaking Renovate tooling (Fixes #5680).
  • Fix PMD violations in Glide.java and GlideExecutor.java (AccessorMethodGeneration and RedundantFieldInitializer).
  • Fix fragile use of TypeMirror#toString in annotation compiler.
  • Update tests to run on API 24.

Changes

ImageDecoder Support

It should be safer to use Android's ImageDecoder (introduced in Android 9.0 Pie / API 28) with Glide on Android Q (API 29) and above. Please consider trying it out, as ImageDecoder is the now preferred mechanism for decoding images in Android and may yield performance and memory usage benefits.

Several critical issues have been resolved in this release:

  • OOM/ANR Fixes: Fixed potential OutOfMemory (OOM) errors and Application Not Responding (ANR) issues when using ImageDecoder with certain input streams or when ArrayPool buffer allocation was enabled.
  • Unbounded Allocations: Fixed unbounded memory allocations when decoding bitmaps from InputStream source types.
  • Buffer Pooling: Added support for allocating ImageDecoder ByteBuffers via Glide's ArrayPool to avoid double-allocation overhead (enabled via setUseArrayPoolForImageDecoderByteBufferAllocation).
  • Direct Uri Decoding: Direct decoding of Bitmaps from Uris using ImageDecoder is now supported. To enable ImageDecoder in your application, configure the options in your AppGlideModule accordingly:
@GlideModule
public class MyAppGlideModule extends AppGlideModule {
  @Override
  public void applyOptions(@NonNull Context context, @NonNull GlideBuilder builder) {
    // Enable ImageDecoder for Bitmaps (Android Q+)
    builder.setImageDecoderEnabledForBitmaps(true);

    // Enable ImageDecoder for Uris (Android Q+)
    builder.setUriImageDecoderEnabled(true);
    
    // Enable optimized buffer pooling for ImageDecoder
    builder.setUseArrayPoolForImageDecoderByteBufferAllocation(true);
    
    // Use heap buffers for ImageDecoder with InputStreams to avoid native memory overhead
    builder.setUseHeapBufferForImageDecoderWithInputStream(true);
  }
}
  • Direct Uri Decoding: Implement UriBitmapImageDecoderResourceDecoder to allow direct decoding of Bitmaps from Uris using Android's ImageDecoder.
  • Direct Memory Decoding: Support direct memory decoding for byte buffers and arrays without stream wrapping.
  • HEIF/HEIC Detection: Add HEIF/HEIC format detection to DefaultImageHeaderParser.
  • Disk Cache Path Memoization: Add a setting to disable disk cache path name memoization in DiskLruCache to reduce retained memory.
  • ImageDecoder Buffer Pooling: Add ImageDecoder ByteBuffer allocation via ArrayPool to avoid double-allocation overhead (flag-guarded by UseArrayPoolForImageDecoderByteBufferAllocation).
  • Fix Unbounded Allocations: Fix unbounded bitmap allocations in Glide ImageDecoder when using InputStream (flag-guarded by UseHeapBufferForImageDecoderWithInputStream).
  • ImageDecoder OOM/ANR Fix: Reject unknown stream formats in InputStreamBitmapImageDecoderResourceDecoder.handles to prevent OOMs/ANRs when ArrayPool is enabled.
  • Resource Leak Fix: Fix resource leak in ByteBufferUtil.fromStream by ensuring buffers from ArrayPool are returned on exception.
  • Picker URI Support: Update isAndroidPickerUri to support new picker URI variations (like picker_get_content/ and picker_transcoded/).
  • Memory Tracking Logs: Add "GlideMemoryTracking" debug tag to trace memory overhead from scaling and cache hits.
  • Experimental Downsample Strategy: Add experimental option setCenterInsideAsDefaultDownsampleStrategy to GlideBuilder to allow using CENTER_INSIDE as the default downsampling strategy.

Full Changelog: https://github.com/bumptech/glide/compare/v5.0.7...v5.0.8

2026-04-19 11:16:30
glide

Glide v5.0.7

Compose

N/A

KTX

N/A

Build Changes

  • Add missing version bump

Changes

N/A

Full Changelog: https://github.com/bumptech/glide/compare/v5.0.6...v5.0.7

2026-04-18 10:25:34
glide

Glide v5.0.6

Compose

  • Version bump to 1.0.0-beta09

KTX

  • Version bump to 1.0.0-beta09

Build Changes

N/A

Changes

Full Changelog: https://github.com/bumptech/glide/compare/v5.0.5...v5.0.6

2025-09-13 07:52:54
glide

Glide v5.0.5

Compose

  • Version bump to 1.0.0-beta08

KTX

  • Version bump to 1.0.0-beta08

Build Changes

N/A

Bugs

Full Changelog: https://github.com/bumptech/glide/compare/v5.0.4...v5.0.5

2025-09-02 07:01:52
glide

Glide v5.0.4

Compose

  • Version bump to 1.0.0-beta07

KTX

  • Version bump to 1.0.0-beta07

Build Changes

N/A

Bugs

  • Fixes compiler module missing in published artifacts. See #5591.

Full Changelog: https://github.com/bumptech/glide/compare/v5.0.3...v5.0.4

2025-09-01 05:54:25
glide

Glide v5.0.3

Compose

  • Version bump to 1.0.0-beta06

KTX

  • Version bump to 1.0.0-beta06

Build Changes

N/A

Bugs

  • Fixes missing gif_decoder modules. See #5580.

Full Changelog: https://github.com/bumptech/glide/compare/v5.0.2...v5.0.3

2025-09-01 04:36:41
glide

Glide v5.0.2

Compose

  • Version bump to 1.0.0-beta05

KTX

  • Version bump to 1.0.0-beta05

Build Changes

N/A

Bugs

  • Fixes missing gifdecoder and disklrucache modules. See #5580.

Full Changelog: https://github.com/bumptech/glide/compare/v5.0.1...v5.0.2