Nuke-WebP-Plugin icon indicating copy to clipboard operation
Nuke-WebP-Plugin copied to clipboard

How to support for still / animated WebP image format

Open david-kollectin opened this issue 4 years ago • 1 comments

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.

david-kollectin avatar Jun 03 '20 03:06 david-kollectin

is there any progress on this issue? @ryokosuge

aniltaskiran avatar Dec 03 '21 07:12 aniltaskiran