diff --git a/SDWebImage/Core/SDImageCache.m b/SDWebImage/Core/SDImageCache.m index da393b85..ac6097b2 100644 --- a/SDWebImage/Core/SDImageCache.m +++ b/SDWebImage/Core/SDImageCache.m @@ -269,9 +269,9 @@ static NSString * _defaultDiskCacheDirectory; format = [SDImageCoderHelper CGImageContainsAlpha:image.CGImage] ? SDImageFormatPNG : SDImageFormatJPEG; } } - NSData *data = [[SDImageCodersManager sharedManager] encodedDataWithImage:image format:format options:context[SDWebImageContextImageEncodeOptions]]; + NSData *encodedData = [[SDImageCodersManager sharedManager] encodedDataWithImage:image format:format options:context[SDWebImageContextImageEncodeOptions]]; dispatch_async(self.ioQueue, ^{ - [self _storeImageDataToDisk:data forKey:key]; + [self _storeImageDataToDisk:encodedData forKey:key]; [self _archivedDataWithImage:image forKey:key]; if (completionBlock) { [(queue ?: SDCallbackQueue.mainQueue) async:^{