-
引入 KingfisherWebP 庫(kù)
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 }