                 return
             }
 
-            self?.downloadTasks.removeObject(forKey: photo)
+            self?.retrieveImageTasks.removeObject(forKey: photo)
 
             if let error = error {
                 uSelf.delegate?.networkIntegration(uSelf, loadDidFailWith: error, for: photo)
             } else {
                 if let image = image {
+                    if let imageData = image.kf.gifRepresentation() {
+                        photo.imageData = imageData
+                    }
+                    
                     photo.image = image
                 }
 

        }

        let task = KingfisherManager.shared.retrieveImage(with: url, options: nil, progressBlock: progress, completionHandler: completion)
        self.downloadTasks.setObject(task, forKey: photo)
    }

    func cancelLoad(for photo: PhotoProtocol) {
        guard let downloadTask = self.downloadTasks.object(forKey: photo) else {
            return
        }

        downloadTask.cancel()

    }

    func cancelAllLoads() {
        let enumerator = self.downloadTasks.objectEnumerator()

        while let downloadTask = enumerator?.nextObject() as? RetrieveImageTask {
            downloadTask.cancel()
        }

        self.downloadTasks.removeAllObjects()
    }
    
}

                return
            }

            uSelf.delegate?.networkIntegration?(uSelf, didUpdateLoadingProgress: CGFloat(receivedSize) / CGFloat(totalSize), for: photo)
        }

        let completion: CompletionHandler = { [weak self] (image, error, cacheType, imageURL) in
