Nuke-WebP-Plugin
Nuke-WebP-Plugin copied to clipboard
How to support for still / animated WebP image format
I would like to use Nuke to deal with web image loading and image cache. And I also have need for loading animated WebP image so I import NukeWebPPlugin. I wrote some code with Nuke for testing:
WebPImageDecoder.enable() let urlStr = "https://isparta.github.io/compare-webp/image/gif_webp/webp/2.webp" if let onlineFileUrl = URL(string: urlStr) { let task = ImagePipeline.shared.loadImage(with: onlineFileUrl, queue: nil, progress: nil) { (result: Result<ImageResponse, ImagePipeline.Error>) in switch result { case .success(let imageRespoonse): //...deal with image break case .failure(let error): debugPrint("error: (error.localizedDescription)") //...error handling break } }
And I got an error: "decoding failed : Failed to create an image from the image data" I would ask How to support for still / animated WebP image format? Thank you.
is there any progress on this issue? @ryokosuge