New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/image/webp: support for WebP Encoding #45121
Comments
cc @nigeltao |
A WebP encoder would be a lot of work. If someone wants to write one, that would be great. But as far as I know nobody is working on that. |
That's a shame, whilst I understand that it may be a bit of work, it feels like it should be out of the box considering webp and go are both made by you guys! Adding C bindings when converting to webp using third party packages can be messy, as well as using the executables. I would love to offer a hand to contribute to the /x/image library but wouldn't know where to start. |
It's not a bit of work. As Ian said, it's a lot of work. :-) |
The good news is that image encoding is much less of a security minefield than image decoding is, simply because the input format (a bitmap) is far, far simpler. That said, have you considered ImageFlow? It’s free software (AGPL) available as both a daemon and a library. Commercial licenses are also available. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as duplicate.
This comment was marked as duplicate.
Starting a new website project with a Go backend and was planning on using WebP for image thumbnails and it's really sad to see that there's no native encoder.. :( I would really like to avoid using C bindings (due to performance and memory safety concerns), but it seems that's the only option at the moment, except for executing the official I also considered using Rust, but that's way too advanced for me. Edit: I found https://github.com/nickalie/go-webpbin which seems quite decent. haven't tested it yet though. |
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as duplicate.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
Could go-libwebp by Jack Mordaunt offer a potential solution? I'm aware that rewriting libwebp in Go would be quite time-consuming, but Jack Mordaunt utilized ccgo and was able to port the libwebp C code to native Go code, making it functional, if I understand correctly. I'm not an expert, and I'm unsure of any potential risks this approach may present, but I wanted to share the idea. @JackMordaunt |
I think there is a better solution. Example may use c-bindings from library on C language. |
Thanks for the reference! Yes, it's functional. However there's a lot of downside to the transpilation approach which bars it from being anything official.
For anyone interested, |
Hi there,
Currently we are able to decode webp images, which is great. But why can't we encode them?
Given that PSI is such a crucial factor for getting websites to rank, it's important that any server should be able to convert and serve webp images.
I have to jump through hoops at the moment and use the webp executable which is far from ideal.
Please please add an encoder!
Many many thanks.
The text was updated successfully, but these errors were encountered: