Golang has no WebP support
pkg.go.dev
Golang has no WebP support
1–5 of 5 posts
Re: Golang has no WebP support
#2WebP is widely supported by every major browser. https://caniuse.com/?search=webp
Golang and WebP were both developed at Google. https://en.wikipedia.org/wiki/WebP https://en.wikipedia.org/wiki/Go_(programming_language)
Golang has image decoder / encoder support for Gif, Jpeg, and Png... but not WebP. https://pkg.go.dev/image@go1.19.2#section-directories
Re: Golang has no WebP support
#3Re: Golang has no WebP support
#4And there is a third-party package [1] for webp also, in native Go, which includes both a decoder and an encoder. Plus there are other third-party packages, that bind to external code (C libs, at a guess).
— If your complaint is speficially that webp support should be a part of the standard library, then perhaps keep an eye on the stuff in x, that's often where stuff happens before making it into the stdlib.
And/or file an issue.
And/or you are welcome to contribute code ;)
Re: Golang has no WebP support
#5There is a decoder in golang.org/x/images/webp already [0], I don't know how full-featured it is: I've never used it. The x libs are part of the Go Project but outside the main Go tree — and are fairly well-known to many Go developers, but clearly not all. Stuff in x sometimes makes its way into the standard library, although not always. And there is a third-party package [1] for webp also, in native Go, which includ…
OTOH, folks have been saying "what if we rewrote the encoder in plain Go (no C)" since 2016 and it doesn't appear to have happened:
https://groups.google.com/g/golang-nuts/c/gZ-PCUGw7Rk/m/lrBF...