Giter VIP home page Giter VIP logo

Comments (11)

mitchellporter avatar mitchellporter commented on August 25, 2024 1

The easiest way to add WebP support is to follow @kean's advice and use WebPImageSerialization. I just set it up and everything's working fine like normal.

from nuke.

kean avatar kean commented on August 25, 2024 1

It would be nice if you guys share what you come up with, I'll add it somewhere in the Documentation.

from nuke.

kean avatar kean commented on August 25, 2024 1

Hey! There is a community plugin (Nuke-WebP-Plugin) which adds support for WebP! I've contacted the author, he's committed to update it to work with Nuke 7 when it is released. This means:

  • adding progressive decoding support (new in Nuke 7)
  • simplifying setup using ImageDecoderRegistry (new in Nuke 7)

I'm adding the link to this plugin in README as a recommended solution for WebP decoding 🍻

from nuke.

kean avatar kean commented on August 25, 2024

There are at least two ways to add WebP support:

  1. Add a new image decoder (see ImageDecoding protocol) and register it in ImageManagerConfiguration. That's how GIF support is implemented in Nuke AnimatedImage Plugin.
  2. Use WebPImageSerialization which has a swizzle that extends UIImage with WebP support. This method doesn't require any additional code on Nuke's side. I haven't tested it in Swift yet, but it should work just fine.

from nuke.

sschizas avatar sschizas commented on August 25, 2024

Any update on this feature?

from nuke.

kean avatar kean commented on August 25, 2024

It seems that there is no work required on Nuke's side (see WebPImageSerialization). Haven't tested it thought.

from nuke.

sschizas avatar sschizas commented on August 25, 2024

I am pretty sure that Nuke should send image/webp at the http header of the request to identify that supports webp. Especially when image is loaded via image cdn

from nuke.

kean avatar kean commented on August 25, 2024

Yeah, that's true, most servers would require you to explicitly tell them that the client supports webp. It's possible to set those headers either using HTTPAdditionalHeaders property of NSURLSessionConfiguration, or via NSURLRequest.

from nuke.

swiftTalker avatar swiftTalker commented on August 25, 2024

@mitchellporter do you mind sharing your implementation for WebP support? So other people including me can use it.

from nuke.

mitchellporter avatar mitchellporter commented on August 25, 2024

@kean Would be more than happy to share and help just need some time. We are using a legacy version of Nuke in an older project that works fine like I mentioned above, but last I checked it no longer works using the latest version of Nuke, animated image plugin, etc.

Will report back when I can share an update and maybe a quick test project too.

from nuke.

mitchellporter avatar mitchellporter commented on August 25, 2024

Bump. This has been long overdue. I'm going to try and spin up a test project within the next week or so. Last I remember WebPImageSerialization was no longer working... a lot has changed with Nuke since the last time I had it working.

I'll update again soon with my findings.

from nuke.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.