diff --git a/android/src/main/java/com/turboimage/TurboImageViewManager.kt b/android/src/main/java/com/turboimage/TurboImageViewManager.kt index e8bb732..d2e98c0 100644 --- a/android/src/main/java/com/turboimage/TurboImageViewManager.kt +++ b/android/src/main/java/com/turboimage/TurboImageViewManager.kt @@ -60,7 +60,7 @@ class TurboImageViewManager : SimpleViewManager() { override fun onAfterUpdateTransaction(view: TurboImageView) { super.onAfterUpdateTransaction(view) - setImageLoader(ImageLoader.Builder(view.context).apply { + ImageLoader.Builder(view.context).apply { respectCacheHeaders(view.cachePolicy == "urlCache") components { add(SvgDecoder.Factory()) @@ -70,7 +70,7 @@ class TurboImageViewManager : SimpleViewManager() { add(GifDecoder.Factory()) } } - }.build()) + }.build().apply { setImageLoader(this) } val diskCacheEnabled = if (view.cachePolicy != "memory") CachePolicy.ENABLED else CachePolicy.DISABLED