SDWebImageWebPCoder
SDWebImageWebPCoder copied to clipboard
Converting a UIImage to the WebP format is extremely slow
Converting a UIImage to the WebP format is extremely slow. For a 2.5-megabyte photo with a compression ratio of 0.85, it takes approximately 13.5 seconds
let webpCoder = SDImageWebPCoder.shared var options: [SDImageCoderOption: Any] = [:] options[SDImageCoderOption.encodeCompressionQuality] = 0.85
if let webpData = webpCoder.encodedData(with: image, format: .webP, options: options) { compressionImageData = webpData }