Is there a library in java for producing/consuming image files in the WebP format? The libraries I found online are either libwebp written in C, or its JNI bindings in Java. Is there anything in pure Java?


3 Answers 3


TwelveMonkeys ImageIO now has full ImageIO read support for WebP (lossy, lossless and lossy + lossless alpha) modes.

Another free option is the ImageIO plugin from Java VP8 Decoder. It contains a Java implementation of the VP8 codec.

Another candidate is JCodec, which have Java VP8 encoding and decoding, but no ImageIO plugin, as far as I can see.

As correctly pointed out by the OP, the VP8 key frame encoding is the method used in WebP for lossy encoding only. The format also specifies lossless encoding, and a combination of lossy RGB + lossless alpha. The above projects does not implement any of these.

  • 1
    Sorry that I'm not familiar with WebP. Is VP8 equivalent to WebP? From Google documentation, VP8 key frame encoding is only one way to encode the WebP image. There is also WebP lossless encoding. Commented Nov 30, 2017 at 17:11
  • Looking forward for lossless and extended (lossy + lossless alpha) modes!
    – Yu Jiaao
    Commented Jul 7, 2021 at 5:09

Scrimage can do this, through delegation to the google binaries (which are included in the distribution).


JDeli can read/write WebP format and many others, but it isn't free.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.