         guard let data = sessionCachedData(withURL: url) else {
             return nil
         }
-        guard let image = UIImage(data: data) else {
+        guard let image = createImage(data: data) else {
             return nil
         }
         addToMemoryCache(image, url: url)

        let key = cacheKeyForURL(url)
        let variant = variantForURL(url)
        let fileURL = permanentCacheFileURL(key: key, variant: variant)
        guard let image = UIImage(contentsOfFile: fileURL.path) else {
            return nil
        }
        addToMemoryCache(image, url: url)

            defer {
                completion()
            }
            guard let image = self.createImage(data: data) else {
                return
            }
            self.addToMemoryCache(image, url: url)
