Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. go-webp

go-webp

MITGov1.0.5

A Go library for encoding and decoding WebP images using C bindings to libwebp.

GitHubGitHub
315 stars39 forks0 contributors

What is go-webp?

go-webp is a Go library that provides encoding and decoding capabilities for WebP images by leveraging C bindings to Google's libwebp library. It offers a native Go interface for working with the modern WebP image format, which provides superior compression compared to JPEG and PNG while maintaining quality.

Target Audience

Go developers who need to process WebP images in their applications, particularly those requiring high-performance encoding and decoding with support for both lossy and lossless compression.

Value Proposition

Developers choose go-webp for its significantly faster performance compared to alternative Go implementations, direct integration with Google's optimized libwebp C library, and a simple, familiar API similar to standard Go image packages.

Overview

Simple and fast webp library for golang

Use Cases

Best For

  • High-performance WebP image decoding in Go applications where speed is critical.
  • Encoding images to WebP format with both lossy and lossless compression options.
  • Integrating WebP support into Go-based image processing pipelines or services.
  • Converting between WebP and other image formats like JPEG within Go programs.
  • Building Go applications that require reliable, optimized WebP handling via libwebp bindings.
  • Projects needing a straightforward Go interface to libwebp without unnecessary abstraction.

Not Ideal For

  • Projects requiring pure Go solutions without C dependencies or CGO enabled
  • Serverless or containerized environments where installing system-level libwebp is impractical
  • Applications needing advanced WebP features like incremental decoding or container API out of the box

Pros & Cons

Pros

Benchmarked Speed Advantage

The README's benchmarks show go-webp decoding is 2-4x faster than alternative implementations like XImage, making it ideal for performance-critical image processing.

Go-Friendly API Design

It provides familiar Decode and Encode functions similar to standard Go image packages, as shown in the examples, reducing the learning curve for developers.

Optimized Libwebp Core

Direct C bindings to Google's libwebp library ensure reliable and efficient WebP handling, leveraging the industry-standard implementation for compression.

Dual Compression Support

It handles both lossy and lossless WebP formats, as highlighted in the key features, offering flexibility for different image quality needs.

Cons

External C Dependency

Requires libwebp to be installed separately on the system, which complicates setup and deployment, especially in cross-platform or restricted environments.

Incomplete Feature Set

The TODO list admits missing features like incremental decoding and container API, limiting advanced use cases without custom implementation.

Setup and Portability Issues

Installation steps are only provided for MacOS and Linux, and reliance on CGO can cause problems on platforms where it's unsupported or disabled.

Frequently Asked Questions

Quick Stats

Stars315
Forks39
Contributors0
Open Issues4
Last commit6 months ago
CreatedSince 2020

Tags

#image-encoding#c-bindings#go-library#image-decoding#image-processing#decoding#golang#encoding#image-compression#go#webp

Built With

l
libwebp
G
Go
C
C++

Included in

Go169.1k
Auto-fetched 18 hours ago

Related Projects

gocvgocv

Go package for computer vision using OpenCV 4 and beyond. Includes support for DNN, CUDA, OpenCV Contrib, and OpenVINO.

Stars7,474
Forks903
Last commit1 month ago
imaginaryimaginary

Fast, simple, scalable, Docker-ready HTTP microservice for high-level image processing

Stars6,073
Forks499
Last commit8 months ago
imagingimaging

Imaging is a simple image processing package for Go

Stars5,744
Forks482
Last commit2 years ago
gggg

Go Graphics - 2D rendering in Go with a simple API.

Stars4,790
Forks383
Last commit2 years ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub