             return
         }
         
-        PINRemoteImageManager.shared().cancelTask(with: uuid as UUID, storeResumeData: true)
+        self.imageManager.cancelTask(with: uuid as UUID, storeResumeData: true)
     }
     
     func cancelAllLoads() {
         let enumerator = self.downloadUUIDs.objectEnumerator()
         
         while let uuid  = enumerator?.nextObject() as? NSUUID {
-            PINRemoteImageManager.shared().cancelTask(with: uuid as UUID, storeResumeData: true)
+            self.imageManager.cancelTask(with: uuid as UUID, storeResumeData: true)
         }
         
         self.downloadUUIDs.removeAllObjects()
     }
     
+    // MARK: - PINRemoteImageManagerAlternateRepresentationProvider
+    func alternateRepresentation(with data: Data!, options: PINRemoteImageManagerDownloadOptions = []) -> Any! {
+        guard let `data` = data else {
+            return nil
+        }
+        
+        return data.containsGIF() ? data : nil
+    }
+    
 }
 
 #endif

            
            self.downloadUUIDs.removeObject(forKey: photo)
            
            if let animatedImage = result.alternativeRepresentation as? FLAnimatedImage {
                // this is not great, as `PINRemoteImage` already creates the `FLAnimatedImage` that we need.
                // something to fix in the future.
                photo.imageData = animatedImage.data
                self.delegate?.networkIntegration(self, loadDidFinishWith: photo)
            } else if let image = result.image {
                photo.image = image

    
import PINRemoteImage

class PINRemoteImageIntegration: NSObject, AXNetworkIntegrationProtocol, PINRemoteImageManagerAlternateRepresentationProvider {

    weak var delegate: AXNetworkIntegrationDelegate?
    
    fileprivate var downloadUUIDs = NSMapTable<AXPhotoProtocol, NSUUID>(keyOptions: .strongMemory, valueOptions: .strongMemory)
    fileprivate(set) var imageManager: PINRemoteImageManager!
    
    override init() {
        super.init()
        self.imageManager = PINRemoteImageManager(
            sessionConfiguration: .default,
            alternativeRepresentationProvider: self,
            imageCache: PINRemoteImageManager.shared().cache // PINRemoteImageManager cache is thread safe, so we should be able to use the same cache instance as our shared counterpart
        )
    }
    
    func loadPhoto(_ photo: AXPhotoProtocol) {
        if photo.imageData != nil || photo.image != nil {
