Skip to content

Releases: bumptech/glide

Glide 4.4.0

04 Dec 16:51
Compare
Choose a tag to compare

This is the November release of Glide.

Features

  • Updated Glide's generated API to allow RequestOptions return values and avoid a bunch of @CheckResult warnings (e78f2ee, 7fccb32)
  • Enabled cache sizes > Integer.MAX_VALUE (d402780, thanks to @bhargavms)
  • Added an API to ViewTarget called clearOnDetach() that allows you to optionally clear and restart requests when the corresponding view is detached and reattached to its window (#2520, d0fd967):
    Glide.with(fragment)
      .load(url)
      .into(imageView)
     .clearOnDetach();
  • Added an API to ViewTarget called waitForLayout() that simplifies the previous mechanism for forcing Glide's ViewTargets to wait for a layout pass before determining the size of the view they wrap (05b8854):
    Glide.with(fragment)
      .load(url)
      .into(imageView)
      .waitForLayout();
  • Added a MockGlideExecutor that could be used as part of a future testing compat library (6cee6d2, thanks to azlatin@)
  • Added an API to specify a custom executor to use when decoding GIF frames (6837543)

Bugs

  • Improved trimming behavior with inconsistent resource sizes (#2550, thanks to @unverbraucht)
  • Fixed overly aggressive escaping of some valid characters in http urls (#2583, 014bf44)
  • Added a direct dependency on support-fragment in Glide's pom (#2547, c1c9be2)
  • Fixed an issue where dereferencing a Target without clearing it would result in the loaded resource never being returned to Glide's memory cache (#2560, 0209662, 7e317c0)
  • Fixed an IllegalStateException when RequestManagers are memoized and then used to start a new load after onDestroy of the corresponding Activity or Fragment (#2262, 8119837)
  • Fixed an NPE when using GifDrawables as thumbnails due to a bug that can fail to clear thumbnails in onStop() (#2555, 9c82c42)
  • Fixed a SecurityException on some devices when trying to register a connectivity receiver (#1417, 6bc908b)
  • Fixed a SecurityException on some devices when trying to obtain connectivity status (#1405, bcd6cc2)
  • Fixed a couple of cases where GifDrawables could continue to animate after clear() or onStop() (#1087, 3dad449, 9d87dea)
  • Improved decode times for GIF frames on earlier versions of ART and some lower end devices by up to 40% (#2471, e7a4942, fa2ebfe, 7c0cd63, 4db20db, 65e5506)
  • Eliminated a few unnecessary object allocations in Glide's request path (b4d778b)
  • Fixed an issue on some devices where ExternalPreferredCacheDiskCacheFactory.java might attempt (and fail) to use external storage if the external storage directory exists but isn't writable (#2641, 5580e51, thanks to @anpez)
  • Ensure that requests started with onlyRetrieveFromCache don't block on already running equivalent requests that aren't using onlyRetrieveFromCache (#2428, 108a062)
  • Fixed a couple of cases where calling load(Bitmap) or load(Drawable) could cause Glide to re-use or recycle the given Bitmap or Drawable (cff4f2c).
  • Fixed a bug where the disk cache could become unusable until apps are restarted if the system clears the cache directory while the app is open and the app calls DiskCache.clear() (#2465, 16eaa9b).
  • Fix a crash attempting to log a recycled Bitmap's size in Glide's BitmapPool pre-filling APIs (#2574, 7387298)
  • Fixed an error log "Expected to receive an object of but instead got null" when restarting requests with thumbnails where the thumbnail previously completed after the full request (a1e3fa2)
  • Fixed a compilation error when compiling with kapt and -Dkotlin.compiler.execution.strategy="in-process" while using a GlideModule with the @Excludes annotation.

Behavior Changes

  • Resources loaded into Targets outside of Activity/Fragment lifecycles (ie with the Application Context) will be returned to Glide's caches via a WeakReference and ReferenceQueue if the Targets are dereferenced without being cleared. Previously dereferencing these Targets would simply allow the underlying resource to be garbage collected, which could lead to unexpected cache misses (#2560). Transient memory usage may increase for applications that regularly dereference Targets without clearing them as the resources are now re-captured instead of being immediately and unexpectedly garbage collected.

    To disable this behavior, in an AppGlideModule, call setIsActiveResourceRetentionAllowed:

    @Override
    public void applyOptions(Context context, GlideBuilder builder) {
      builder.setIsActiveResourceRetentionAllowed(false);
    }
  • Glide.with(fragment).load() and Glide.with(fragment).asDrawable().load() now behave identically. Previously Glide.with(fragment).asDrawable().load() would apply some specific options based on the type of the model provided to load(), but Glide.with(fragment).load() would not. Now both behave identically (8613292).

  • Calling RequestBuilder.load(byte[]) will no longer override previously set DiskCacheStrategy and skipMemoryCacheOptions options (c7b7dfe).

Breaking Changes

  • The RequestManager.load(Object) method has been augmented with the same type specific overloads that are available on RequestBuilder. Unfortunately this may break some tests that mock the return value of RequestManager.load(). Typically those breakages can be resolved by casting:
      when(requestManager.load((Object) any())).thenReturn(requestBuilder);
    Or if you're passing in null as your model in your tests:
     when(requestManager.load((Object) null)).thenReturn(requestBuilder);
    Or if you have a specific type for your model:
      when(requestManager.load(any(Uri.class))).thenReturn(requestBuilder);
    Or if your test has a specific type, but your production code uses an Object:
      // In tests:
      String url = ...
      when(requestManager.load((Object) eq(url))).thenReturn(requestBuilder);
      // In prod code:
      Object url = ...
      requestManager.load(url).into(imageView);

Deprecations

  • Deprecated void return values for @GlideOption and @GlideType annotated methods (e78f2ee, 7fccb32)
  • Deprecated DiskLruCacheWrapper.get() in favor of a static factory method (1cfc4af)
  • Deprecated setResizeExecutor() in GlideBuilder in favor of setSourceExecutor() (6837543)
  • Deprecated ArrayPool.put(Array, Class<Array>) in favor of ArrayPool.put(Array) (b4d778b)
  • Deprecated the constructor in ViewTarget that accepts a boolean waitForLayout parameter in favor of the waitForLayout() method on ViewTarget (05b8854).

Glide 4.3.1

06 Nov 20:28
Compare
Choose a tag to compare

This is a bug fix release of Glide 4.3.0.

Bugfixes

  • Fix ghosting in animated GIFs with certain combinations of disposal settings and frames (c3d0530, #2521, thanks to @michaeimm)
  • Fix a Bitmap re-use bug causing graphical errors, load failures and/or crashes when loading Drawables with a transformation applied that didn't actually change the image for the requested width and height.
    (2371aa6)
  • Fix a race condition causing animated Drawables not to be started when loaded into Views from Glide's memory cache (aa2711b, #2541)

Glide 4.3.0

31 Oct 14:57
Compare
Choose a tag to compare

This is the October release of Glide.

Features

  • Added a DiskLruCacheFactory implementation that falls back to the internal cache directory on devices where the external cache directory isn't available (#24, 56a4275, thanks to @anpez)
  • Added an error API to start a new load if the primary load fails.
    See the docs page for usage. (b06b0cc),
  • Added support for decoding non-Bitmap Drawables and for transforming most of those types of Drawables. Animated Drawables may be loaded if they're supported by the framework or support library, but can't be transformed. Consider using optionalTransform if you want to try to transform non-Bitmap resources but don't want your loads to fail if transformations can't be applied. (#350, a0628b8, 7614e10, fc4a456, 90f1cc9)
  • Added a helper method to avoid nesting when applying multiple levels of thumbnails (bc1b25e)
  • Pass the Context provided to Glide.with() (either the actual Context or the Context of the given Fragment or Activity) into Glide's requests. As a result, Glide will use the Theme of the provided Context automatically. Callers can override the default Theme with the theme() option (#1267, bbb25af).
  • Pass through exception messages to RequestFutureTarget.
    Previously all load failures would throw an ExecutionException with a more or less useless generic error message and stack trace. Now the ExceptionMessage will contain the same failure message that you see logged with the Glide log tag. (65048a4)
  • Added support for passing Bitmaps and Drawables into .load() (7663c21)

Bugs

  • Added @CheckResult to most intermediate builder methods in Glide's various builder classes to avoid errors where developers ignore the results and end up ignoring the options they'd tried to apply (739cb35, 28e461e, thanks to @TWiStErRob)
  • Avoid a concurrency bug in the platform on more varieties of Moto Xs (1e2fb23)
  • Fixed an integer overflow when upscaling images in Downsampler (#2459, c7383b2)
  • Fixed a couple of import style nits (6cd8289, thanks to @brettchabot)
  • Added a separate executor to decode GIF frames on to avoid stuttering when scrolling through lists of GIFs that was caused by Glide's normal threads being blocked by I/O or decoding GIF headers (#899, c4db04e).
  • Fixed corrupt images caused by the RoundedCorners transformation (#2472, 0b5d1bc).
  • Removed an inaccurate Precondition that obfuscated the reasons for load failures (#2462, 890454a)
  • Avoid failing requests for Files types that can't be mmaped (cbe9f42, thanks to @pkorth).
  • Fixed a crash performing network operations when using a GlideExecutor with a custom UncaughtExceptionHandler (#2508, e6e2aef, thanks to @stephanenicolas)
  • Fixed Glide's Futures from blocking forever if the Request or a custom component throws an unexpected exception (74fcad1)
  • Avoid showing incorrect frames when pausing/restarting GIFs (#2526, 90b3b9f)

Build

  • Fixed a bunch of warnings and compile time noise and cleaned up a variety of build files and versions (#2426, thanks to @TWiStErRob)
  • Fixed duplicate class files in the compiler jar (#2452m, 7c09fc1)

Behavior Changes

  • Include the presence or absence (but not equality of) RequestListeners when determining whether or not to ignore new Requests as part of an ongoing effort to avoid unnecessary restarts of in progress loads (#2270, 95caa05).
  • Default GIFs to using ARGB_8888 instead of RGB_565 and add an API to specify the preferred format for GIFs specifically. As a result both GIF quality and memory usage will increase. For details on configuring the format, see the javadocs (#2396, 6f91031).

Breaking Changes

  • GlideExceptions getRootCauses() method will now return a List of Throwable instead of Exception. Doing so allows us to better handle certain expected Errors, like OutOfMemoryException that otherwise have to be caught by our Executor and swallowed. This change was made as part of avoiding behavior in Glide's Futures that could cause them to block forever (74fcad1).

Glide 4.2.0

03 Oct 16:13
Compare
Choose a tag to compare

This is the September release of Glide.

Features

  • Added support for replacing Glide's default Encoders (03f5bd4, #2349, thanks to @MistaGreen)
  • Added a more advanced way to control how/when requests are restarted when they have the same cache keys (b667cab, thanks to @Tolriq).
  • Repackaged Glide's annotation processor dependencies to avoid build errors with the generated API caused by dependency conflicts (a0e388e, #2059, thanks to @TWiStErRob)
  • Added a bucketing system when registering custom components to make choosing the order in which the components are called easier and more intuitive (da90633, thanks to asuszek@).
  • Pass Options to ResourceTranscoders to allow customizing behavior (134870e, #2417).
  • Added an interface to allow reporting or uncaught exceptions on Glide's thread pools (a1cd3af, thanks to @stephanenicolas)

Bug fixes

  • Fixed incorrect Bitmap pool sizes on some versions of Android (fe5289d, #2334, thanks to @SUPERCILEX)
  • Fixed a resource leak when following redirects in Glide's default Http library (7f62597, 73a8054, #2352)
  • Fixed a racy resource leak where DataFetchers were sometimes never closed (d482b8e)
  • Fixed load failures due to a simultaneous put exception in Glide's default disk cache (01f5a3d)
  • Fixed Http load failures caused by unexpected characters in the user agent of some devices (3cd0685)
  • Worked around an O specific ClassCastException in the OkHttp support library (a4af922)
  • Fixed logic in RequestFutureTarget to better match the Future documentation (f033e9b)
  • Fixed a few rounding issues when downsampling and transforming images to eliminate hardware bitmap errors and wasteful allocations when decoded Bitmaps from Downsampler are ~1 pixel off of the size required by Transformations (f5ba374, b1b024e, 4b5ccaa)
  • Fix get(View) failing to find non-support Fragments (a0c5af1)
  • Add better null handling to ListPreloader (c3479c4, #2379)
  • Fixed assertions when generated GlideRequests were used to load a model and then modified after the load was started (d56e08c).
  • Fixed load failures on some devices where UUIDs initialization is broken (d67ce32, #1510)
  • Improved performance loading video frames slightly be avoiding duplicate setDataSource calls (a84deb3).
  • Handle all types of exceptions thrown by ResourceDecoders to allow other registered ResourceDecoders to run even if one decoder fails or behaves unexpectedly (6cffaab).
  • Fixed an exception using HARDWARE Bitmaps with images where Glide is unable to determine the original dimensions (f9757a5).
  • Fixed an issue where sometimes the MediaStore thumbnail would be returned when Target.SIZE_ORIGINAL was used (4501396, thanks to asuszek@).

Documentation

  • Added links to a Simplified Chinese translation of Glide's documentation page (ee557b6, thanks to @Muyangmin)
  • Added Google's maven repo for support libraries to the setup example in the readme (3bf2d36, thanks to @rocboronat)

Behavior changes

  • Calling into() or clear() in a RequestListener or Target implementation will now always crash with an assertion. Previously it would sometimes crash depending on how the request was configured. To avoid the exception, you can use Handler#post to post your into() or clear() call to the main thread instead of calling it directly (6fb87b3, #2413)
  • Glide's interpretation of View sizes has changed substantially, see #2431 for more details.
  • Changed the default downsample strategy to CENTER_OUTSIDE on KitKat+ for cases where neither a strategy nor a transformation that uses a strategy is applied to a load (8a90f54, thanks to asuszek@).

Glide 4.1.1

05 Sep 14:50
Compare
Choose a tag to compare

This is a bugfix release of Glide 4.1.

Bugfixes

  • Fix com.android.dex.DexException: Multiple dex files define Landroid/support/compat/R$drawable (#2322, 1325d87)
  • Fix WARNING: Module 'com.github.bumptech.glide:glide:4.1.0' depends on one or more Android Libraries but is a jar (#2318, 789161a)

Glide 4.1.0

01 Sep 15:07
Compare
Choose a tag to compare

This is the August release of Glide.

Bug fixes

Features

Build changes

API/Behavior changes:

  1. After 9d10097, if you attempt to start a request that is exactly the same as the request already in progress for a given View or Target, your new request will be ignored and the old request will be allowed to complete. If you need to override this behavior, you can do so by manually calling clear() on the View or Target before starting your new load. Consider filing an issue if you encounter a problem with this feature.
  2. After 06aced3, Glide will always use a TransitionDrawable to run the cross fade transition. Previously cross fade would use a ViewAnimation for the first image in a request to complete and only use TransitionDrawables for animating from thumbnails to full images. RecyclerView does not handle ViewAnimations run outside of its item animator so we've removed the use of ViewAnimation. As a result, if you use views like CircularImageView that can't handle animated Drawables, you may see a change in behavior. Consider using a ViewAnimation based Transition instead of a cross fade if you're not loading in a RecyclerView or file a new issue if you encounter a situation where neither cross fade nor a ViewAnimation will work.
  3. After d83de42, setting DecodeFormat.ARGB_8888 or DecodeFormat.RGB_565 will cause Glide to attempt to decode Bitmaps using Bitmap.Config.HARDWARE. Hardware Bitmaps are more memory efficient, but can't be drawn in software and don't expose their pixels so methods like getPixel() will throw an exception, as will attempting to draw a hardware bitmap to a Canvas. You can avoid using Hardware Bitmaps for an individual request by calling RequestOptions#disallowHardwareConfig. You can also disallow hardware configurations for your entire application by passing in RequestOptions into GlideBuilder in your AppGlideModule.

Glide 4.0.0

01 Aug 16:11
Compare
Choose a tag to compare

This is the July release of Glide.

We're calling this release 4.0.0, which means it's the first stable release of Glide v4.

Bug fixes

  • Fixed an error initializing the Glide singleton allowing callers in some cases to obtain a partially initialized object (6c56e38, thanks to @Codeintheory for fixing this in the v3 branch in #2061).
  • Fixed an issue where requesting only identity encodings from some image backends caused those image backends to return compressed streams that were not transparently decoded by HttpUrlConnection, resulting in decoding failures (#2132)
  • Updated some old documentation in DataFetcher (#2153, thanks to @Teovald)
  • Fixed an issue causing Glide to wait forever to obtain View sizes for Views that we're re-attached to windows without requiring a size change (#1981)
  • Fixed a few typos in the Readme (#2191, thanks to @rmtheis)
  • Fixed a crash in DefaultConnectivityMonitorFactory when Glide was called via an IPC from an application that had the ACCESS_NETWORK_STATE permission but in an application that did not have the ACCESS_NETWORK_STATE permission (#2121).

Glide 4.0.0 RC1

21 Jun 15:19
Compare
Choose a tag to compare
Glide 4.0.0 RC1 Pre-release
Pre-release

This is the June release of Glide.

Glide 4.0.0 RC1 is an incremental pre-release version of Glide 4.

Features

  • Added support for VectorDrawables to the placeholder methods (#1946, thanks to @Teovald)
  • Minimal support for additional Bitmap configurations in Android O (853c687, better support will be coming in the future)

Bug fixes

  • Fixed a duplicate field error when using GlideExtensions (#1971)
  • Fixed VisibleForTesting lint errors in Glide's generated code (#1977)
  • Fixed a bug preventing us from falling back to the error Drawable for null models when the fallback drawable isn't specified (#1985)
  • Fixed an NPE when obtaining a RequestManager for a View (Glide.with(view), #1991)
  • Propagate HTTP exceptions from the OkHttp library so that they're accessible when requests fail (#1967)
  • Fixed a race condition causing resource leaks (#1996)
  • Fixed an NPE in MultiModelLoader (#2028)
  • Fixed a broken null check (48d1f14, thanks mattq@)
  • Fixed a bug preventing the placeholder Drawable from being shown for null models when both the fallback and the error Drawables are unspecified (41cc06c, thnaks to angelorhoit@)
  • Fixed an IllegalStateException when pending requests were cancelled and restarted (243c28c)

Packaging

  • Exclude R$ files from jars compiled from integration libraries (#1972, ee8a8ed)
  • Populate javadoc jar files for all maven artifcats (#1972, bfe1442)
  • Removed an aar dependency in the recyclerview integration jar artifact (#2053)

Glide 4.0.0 RC0

17 May 18:07
Compare
Choose a tag to compare
Glide 4.0.0 RC0 Pre-release
Pre-release

Changes

There are too many changes to list individually, but here's a few highlights:

  • New documentation that users can contribute to by submitting pull requests to Glide's gh-pages branch.
  • A new extensible generated API that allows you to easily customize Glide's fluent API by adding new types or custom option sets.
  • Substantially simplified types for individual requests that ensure that options are consistently available and easy to use even if you're loading different types of resources.
  • A variety of performance improvements, including a substantial reduction in garbage when downsampling images, a more intelligent default disk cache strategy, and improved performance when loading GIFs.
  • Improved handling of View sizes and layouts, especially in RecyclerView.

Status

Glide 4.0 is used internally by a variety of teams at Google and the library is considered stable internally. I expect that there will be more external users who may uncover issues that haven't come up internally. As a result I'm releasing this as an RC. If we don't uncover significant issues with stability or in the API, I expect a non-RC release shortly.

Release schedule.

Glide has had a rather haphazard approach to releases in the past, largely because I maintain Glide mostly in my free time. Going forward we're going to try to provide regular releases:

  • Releases will go out once a month, around the 15th (the exact date may vary a bit)
  • Releases will be skipped only if no changes have been since the previous release.
  • Releases may include breaking API changes without a major version change.

The third bullet point will help bridge the gap between how Glide is maintained inside and outside of Google and enable more regular releases.

Glide 3.8.0

03 May 14:35
Compare
Choose a tag to compare

Glide 3.8.0 is a minor feature/bugfix release.

Features

  • Added getTotalLoopCount to GIFs (#1836, thanks to @toyama-sumio)
  • Added a method to turn off manifest parsing for applications that do not use integration libraries (#1754, thanks to @joshzana)
  • Added support for contact Uris (#394, thanks to @R4md4c)
  • Better handling of OOMs (#1057, thanks to @dmapr and @ihenchi)

Notable Bugfixes

For a complete list of changes, see v3.7.0...v3.8.0