public static void addCustomDrawableFactories(
      Context context, DraweeConfig.Builder draweeConfigBuilder) {
    // We always add the color drawable factory so that it can be used for image decoder overrides,
    // see ImageFormatOverrideExample.
    draweeConfigBuilder.addCustomDrawableFactory(ColorImageExample.createDrawableFactory());
    if (isSvgEnabled(context)) {
      draweeConfigBuilder.addCustomDrawableFactory(new SvgDecoderExample.SvgDrawableFactory());
    }
    if (isKeyframesEnabled()) {
      draweeConfigBuilder.addCustomDrawableFactory(KeyframesDecoderExample.createDrawableFactory());
    }
  }
Helper class to add custom decoders and drawable factories if enabled.
samples/showcase/src/main/java/com/facebook/fresco/samples/showcase/CustomImageFormatConfigurator.java