Dockerized service that resizes, crops and compresses images on the fly via URL parameters, with caching and AVIF/WebP/MozJPEG output.
webp-sh/webp_server_go
A Go server that converts JPEG, PNG, BMP, GIF, SVG and other images to WebP or AVIF on the fly, without changing image URLs.
Open-source alternative to:Cloudinary
imgix
- Stars
- 2,006
- Forks
- 187
- Open issues
- 4
- Last commit
- 9 days ago
What is it?
WebP Server Go is a server written in Go that serves images in optimized formats on request. When a browser asks for a JPEG, PNG, BMP, GIF, SVG, HEIC, NEF or WebP file, the server returns a WebP or AVIF version of it at the same URL, so existing image links keep working.
Converted files are cached in an output directory, and source metadata is stored separately so the cache can be validated against the originals. The project is designed to run in Docker, with volume mounts for the source pictures, the cache and the metadata. A custom config.json can be mounted to adjust behaviour.
The project also offers WebP Cloud, a hosted version for static sites, and a free public service for proxying and optimizing GitHub avatars and Gravatar images.
Key features
- 01Converts JPEG, PNG, BMP, GIF, SVG, HEIC, NEF and WebP images to WebP or AVIF on request.
- 02Keeps original image URLs unchanged, so no page markup needs editing.
- 03Caches converted images and source metadata in separate directories.
- 04Runs in Docker with a docker-compose example and a custom config.json option.
- 05Supports image processing parameters such as blur and sharpen in the hosted WebP Cloud service.
Use cases
- Speeding up a website that serves many JPG or PNG images without re-exporting them.
- Serving optimized images from a self-hosted origin behind an Nginx reverse proxy.
- Compressing GitHub avatars or Gravatar images for faster page loads via the public service.
- Hosting a static site's images through WebP Cloud without running a server.
Quick start
- 1
Install Docker and docker-compose
- 2
Create a docker-compose.yml file with the webpsh/webp-server-go image and volume mounts
- 3
Start the container
docker-compose up -d
Things to know
- Licensed under GPL-3.0, a copyleft license that requires derivative works to be open-sourced under the same terms.
- The README strongly recommends Docker because running the binary directly can run into glibc and dependency library issues.
- Self-hosting requires configuring volume mounts, a reverse proxy, and optionally a custom config.json.
In collections
Topics
FAQ
- What is webp_server_go?
- A Go server that converts JPEG, PNG, BMP, GIF, SVG and other images to WebP or AVIF on the fly, without changing image URLs. WebP Server Go is a server written in Go that serves images in optimized formats on request. When a browser asks for a JPEG, PNG, BMP, GIF, SVG, HEIC, NEF or WebP file, the server returns a WebP or AVIF version of it at the same URL, so existing image links keep working.
- Is webp_server_go free to use? What license does it have?
- webp_server_go is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
- Is webp_server_go still maintained?
- Actively maintained. The last commit to webp_server_go was on Oct 30, 2026.
- What can I use webp_server_go for?
- Speeding up a website that serves many JPG or PNG images without re-exporting them. Serving optimized images from a self-hosted origin behind an Nginx reverse proxy. Compressing GitHub avatars or Gravatar images for faster page loads via the public service. Hosting a static site's images through WebP Cloud without running a server.
- How do I install webp_server_go?
- Install Docker and docker-compose Create a docker-compose.yml file with the webpsh/webp-server-go image and volume mounts Start the container: docker-compose up -d
- Where can I get webp_server_go?
- The source code and installation instructions are on GitHub: https://github.com/webp-sh/webp_server_go
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A standalone HTTP server that resizes, crops, processes and converts images on the fly from URL-encoded options.
High-performance Node.js image processing module that resizes and converts JPEG, PNG, WebP, AVIF and TIFF images using libvips.
Self-hosted media processing platform that transforms, optimizes and caches images and videos via URL, a Cloudinary alternative.
Privacy-first local image and GIF compression workbench for Web, Windows, macOS and Linux, with comparison, resizing, conversion and renaming.
Self-hosted Docker web toolbox for converting 70+ image formats, bulk compression, per-file cropping, and local AI background removal.