SDWebImage + WebP ImageView flickers when application re-enters foreground

I am facing the problem of integrating SDWebImage + WebP in our project through CocoaPods. I use SDWebImage + WebP to upload my webp images from my server to the collection list in a UItableView.

Each time you re-enter the foreground or each time you restart the imageView in the cell, the images from the disk will be retrieved (while the image will be blank) and the UIImageview will be reloaded with the same image, even if the data has not changed on the server.

But when I used the JPG format with the same code base, it will work as I expected, there is no black color when re-entering the foreground, it displays cached images. But it does not work with webp

The code I used:

[videoV.imageViewVideo sd_setImageWithURL:[NSURL URLWithString:imageUrl] placeholderImage:nil options:SDWebImageRefreshCached|SDWebImageRetryFailed ]; 

Any help appreciated!

+7
ios iphone sdwebimage webp
source share
1 answer

I am using a workaround. This may cause a problem that the image cache cannot be updated.

 guard self.kf.webURL != url || self.image == placeholder || self.image == nil 
0
source share

All Articles