Update the comment to show why we need filter GIF

This commit is contained in:
zhongwuzw 2019-01-31 12:01:04 +08:00
parent 05d3c7fdcb
commit f0a4014aa9
1 changed files with 2 additions and 1 deletions

View File

@ -419,7 +419,8 @@ didReceiveResponse:(NSURLResponse *)response
NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL];
image = [self scaledImageForKey:key image:image];
// Do not force decoding animated images
// Do not force decoding animated images or GIF,
// because there has imageCoder which can change `image` or `imageData` to static image, lose the animated feature totally.
BOOL shouldDecode = !image.images && image.sd_imageFormat != SDImageFormatGIF;
if (shouldDecode) {
if (self.shouldDecompressImages) {