bumptech/glide · error · IllegalArgumentException

No transcoder registered to transcode from {resourceClass} t

Error message

No transcoder registered to transcode from {resourceClass} to {transcodedClass}

What it means

IllegalArgumentException thrown by TranscoderRegistry.get() when no registered ResourceTranscoder can convert resourceClass to transcodedClass and the transcodedClass is not assignable from the resourceClass. Glide registers a fixed set of transcoders (e.g. Bitmap -> Drawable, GifDrawable -> Drawable); asking for an unregistered conversion path is a programming error.

Source

Thrown at library/src/main/java/com/bumptech/glide/load/resource/transcode/TranscoderRegistry.java:58

   */
  @NonNull
  @SuppressWarnings("unchecked")
  public synchronized <Z, R> ResourceTranscoder<Z, R> get(
      @NonNull Class<Z> resourceClass, @NonNull Class<R> transcodedClass) {
    // For example, there may be a transcoder that can convert a GifDrawable to a Drawable, which
    // will be caught above. However, if there is no registered transcoder, we can still just use
    // the UnitTranscoder to return the Drawable because the transcode class (Drawable) is
    // assignable from the resource class (GifDrawable).
    if (transcodedClass.isAssignableFrom(resourceClass)) {
      return (ResourceTranscoder<Z, R>) UnitTranscoder.get();
    }
    for (Entry<?, ?> entry : transcoders) {
      if (entry.handles(resourceClass, transcodedClass)) {
        return (ResourceTranscoder<Z, R>) entry.transcoder;
      }
    }

    throw new IllegalArgumentException(
        "No transcoder registered to transcode from " + resourceClass + " to " + transcodedClass);
  }

  @NonNull
  @SuppressWarnings("unchecked")
  public synchronized <Z, R> List<Class<R>> getTranscodeClasses(
      @NonNull Class<Z> resourceClass, @NonNull Class<R> transcodeClass) {
    List<Class<R>> transcodeClasses = new ArrayList<>();
    // GifDrawable -> Drawable is just the UnitTranscoder, as is GifDrawable -> GifDrawable.
    if (transcodeClass.isAssignableFrom(resourceClass)) {
      transcodeClasses.add(transcodeClass);
      return transcodeClasses;
    }

    for (Entry<?, ?> entry : transcoders) {
      if (entry.handles(resourceClass, transcodeClass)
          && !transcodeClasses.contains((Class<R>) entry.toClass)) {
        transcodeClasses.add((Class<R>) entry.toClass);

View on GitHub (pinned to eb14a895d8)

Solutions

  1. Use .asBitmap(), .asGif(), .asDrawable() etc. for supported types instead of arbitrary classes.
  2. If you need a custom type, register a ResourceTranscoder via registry.register(ResourceClass, TranscodedClass, transcoder) in your AppGlideModule.
  3. Check that your custom decoder produces a class for which a transcoder exists (or is assignable).

Example fix

// before
Glide.with(ctx).as(MyCustomType.class).load(model).into(target); // no transcoder
// after (register transcoder in AppGlideModule)
@Override public void registerComponents(Context ctx, Glide glide, Registry registry) {
  registry.register(Bitmap.class, MyCustomType.class, new MyTranscoder());
}
Defensive patterns

Strategy: validation

Validate before calling

// Prefer built-in .as*() factories; if you need a custom type, register a transcoder.
// In AppGlideModule.registerComponents:
registry.register(MyResource.class, MyOutput.class, new MyTranscoder());

Prevention

When it happens

Trigger: Calling .as(SomeClass) with a class Glide has no transcoder for, e.g. .as(JSONObject.class) or a custom model with no matching transcoder registration. Removing or failing to register a transcoder in a custom GlideModule.

Common situations: Misconfiguring Registry.append()/register() in an AppGlideModule so that a needed transcoder is missing. Asking .as() for a type the pipeline cannot produce. Type-erasure bugs where the resource class differs from what was registered.

Related errors


AI-assisted analysis of bumptech/glide@eb14a895d8 (2026-08-14). Data as JSON: /api/errors/1c89611b253ac84a. Report an issue: GitHub.