I was able to download and display Webp images without SDWebImageWebPCoder using SDWebImage 5.13.4. So what is the purpose of SDWebImageWebPCoder? Does SDWebImage already support Webp or am I wrong about something here? How can I identify if Webp images are being downloaded to my app or not?
Asked
Active
Viewed 335 times
1 Answers
1
According to the ReadMe:
WebP format from iOS 14/macOS 11.0 via SDWebImageAWebPCoder. For lower firmware, use coder plugin SDWebImageWebPCoder
Google introduce the WebP format, and Apple decided later to support it, natively in UIKit.framework
. So, natively, UIImage(data: webpData)
works on iOS14 +.
Depending on which version of iOS you want to support for your App, you might need or not the SDWebImageWebPCoder
plug-in lib, which will decode manually the WebP image raw data.

Larme
- 24,190
- 6
- 51
- 81
-
Do you know any native way to encode a UIImage in webp? Something like UIImage.pngData but for webp? – algrid Jul 14 '23 at 15:59
-
1https://github.com/SDWebImage/SDWebImageWebPCoder seems to do both (decoding and encoding) – Larme Jul 14 '23 at 18:52