     }
 }
 
+// MARK: - ImageLoaderDelegate
+
+public protocol ImageLoaderDelegate {
+    func imageLoader(loader: ImageLoader, shouldProcessImage image: Image) -> Bool
+    func imageLoader(loader: ImageLoader, decompressorForRequest request: ImageRequest) -> ImageProcessing?
+}
+
+extension ImageLoaderDelegate {
+    /** Returns true when image loader should process image. Processing includes both decompressing.
+    */
+    public func imageLoader(loader: ImageLoader, shouldProcessImage image: Image) -> Bool {
+        return true
+    }
+    
+    public func imageLoader(loader: ImageLoader, decompressorForRequest request: ImageRequest) -> ImageProcessing? {
+        #if !os(OSX)
+            if request.shouldDecompressImage {
+                return ImageDecompressor(targetSize: request.targetSize, contentMode: request.contentMode)
+            }
+        #endif
+        return nil
+    }
+}
+
+public class ImageLoaderDefaultDelegate: ImageLoaderDelegate {
+    public init() {}
+}
+
 // MARK: - ImageLoader
 
 /** Implements image loading using objects conforming to ImageDataLoading, ImageDecoding and ImageProcessing protocols. Reuses data tasks for multiple equivalent image tasks.

    private var sessionTasks = [ImageRequestKey : ImageSessionTask]()
    private let queue = dispatch_queue_create("ImageLoader-InternalSerialQueue", DISPATCH_QUEUE_SERIAL)
    
    public init(configuration: ImageLoaderConfiguration) {
        self.configuration = configuration
    }
    
    public func resumeLoadingForTask(task: ImageTask) {

public class ImageLoader: ImageLoading {
    public weak var manager: ImageLoadingManager?
    public let configuration: ImageLoaderConfiguration
    public let delegate: ImageLoaderDelegate
    
    private var dataLoader: ImageDataLoading {
        return self.configuration.dataLoader
