         return (optimizedURL, 1)
     }
     
-    func centeredConfiguration(forFrame frame: CGRect, scale: CGFloat) -> ImageConfiguration {
+    func fitConfiguration(forFrame frame: CGRect) -> ImageConfiguration {
+        guard var components = URLComponents(url: url, resolvingAgainstBaseURL: false) else {
+            return (url, 1)
+        }
+        
+        var queryItems = components.queryItems ?? [URLQueryItem]()
+        
+        let width = frame.width * UIScreen.main.scale
+        let height = frame.height * UIScreen.main.scale
+        
+        queryItems.append(contentsOf: [
+            URLQueryItem(name: "fit", value: "max"),
+            URLQueryItem(name: "w", value: width.paramValue),
+            URLQueryItem(name: "h", value: height.paramValue)
+            ])
+        
+        components.queryItems = queryItems
+        
+        guard let optimizedURL = components.url else {
+            return (url, 1)
+        }
+        
+        return (optimizedURL, 1)
+    }
+    
+    func fillConfiguration(forFrame frame: CGRect) -> ImageConfiguration {
+        guard var components = URLComponents(url: url, resolvingAgainstBaseURL: false) else {
+            return (url, 1)
+        }
+        
+        var queryItems = components.queryItems ?? [URLQueryItem]()
+
+        let width = frame.width * UIScreen.main.scale
+        let height = frame.height * UIScreen.main.scale
+        
+        queryItems.append(contentsOf: [
+            URLQueryItem(name: "fit", value: "min"),
+            URLQueryItem(name: "w", value: width.paramValue),
+            URLQueryItem(name: "h", value: height.paramValue)
+            ])
+        
+        components.queryItems = queryItems
+        
+        guard let optimizedURL = components.url else {
+            return (url, 1)
+        }
+        
+        return (optimizedURL, 1)
+    }
+    
+    func originalConfiguration(forFrame frame: CGRect, scale: CGFloat) -> ImageConfiguration {
         let width = min(frame.width * scale, size.width)
         let height = min(frame.height * scale, size.height)
         let x = (size.width - width) / 2

        
        switch backgroundConfiguration.backgroundContentMode {
        case .Original:
            imageConfiguration = backgroundImage.centeredConfiguration(forFrame: frame, scale: backgroundConfiguration.backgroundScale)
        case .Tile:
            imageConfiguration = backgroundImage.tiledConfiguration(forFrame: frame, scale: backgroundConfiguration.backgroundScale)
        case .Stretch:
            imageConfiguration = backgroundImage.constrainedConfiguration(forFrame: frame)
        default:
            break
        }

        return croppedConfiguration(forRect: rect, scale: scale)
    }

    func tileConfiguration(forFrame frame: CGRect, scale: CGFloat) -> ImageConfiguration {
        let width = min(frame.width * scale, size.width)
        let height = min(frame.height * scale, size.height)
        let rect = CGRect(x: 0, y: 0, width: width, height: height)
