-
引入 KingfisherWebP 库
pod 'KingfisherWebP'
-
添加 options
[.processor(WebPProcessor.default), .cacheSerializer(WebPSerializer.default)]
self.kf.setImage(with: URL(string: string), placeholder: placeholder, options: [.processor(WebPProcessor.default), .cacheSerializer(WebPSerializer.default)]) { (img, err, cacheType, imgUrl) in }