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?
Have you looked at the ImageIO plugins found in Java VP8 Decoder? It seems to be a full Java implementation of the VP8 codec.
Unfortunately, it contains only read support for ImageIO, bu maybe it could be used as a starting point for implementing a writer too.
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.