{"id":13466433,"url":"https://github.com/webp-sh/webp_server_go","last_synced_at":"2026-01-04T15:14:16.698Z","repository":{"id":37015504,"uuid":"239239351","full_name":"webp-sh/webp_server_go","owner":"webp-sh","description":"Go version of WebP Server. A tool that will serve your JPG/PNG/BMP/SVGs as WebP/AVIF format with compression, on-the-fly.","archived":false,"fork":false,"pushed_at":"2025-03-20T03:14:13.000Z","size":36331,"stargazers_count":1895,"open_issues_count":6,"forks_count":179,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-20T03:36:06.811Z","etag":null,"topics":["image-optimization","image-processing","pagespeed","serving-images","webp","webp-server"],"latest_commit_sha":null,"homepage":"https://docs.webp.sh","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webp-sh.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"webp-sh"}},"created_at":"2020-02-09T03:15:01.000Z","updated_at":"2025-03-20T03:14:15.000Z","dependencies_parsed_at":"2023-02-17T18:31:14.353Z","dependency_job_id":"5bc15d1e-2063-43b7-942a-ec1d4a2cade0","html_url":"https://github.com/webp-sh/webp_server_go","commit_stats":null,"previous_names":[],"tags_count":64,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webp-sh%2Fwebp_server_go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webp-sh%2Fwebp_server_go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webp-sh%2Fwebp_server_go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webp-sh%2Fwebp_server_go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webp-sh","download_url":"https://codeload.github.com/webp-sh/webp_server_go/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245548417,"owners_count":20633576,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-optimization","image-processing","pagespeed","serving-images","webp","webp-server"],"created_at":"2024-07-31T15:00:44.119Z","updated_at":"2026-01-04T15:14:16.654Z","avatar_url":"https://github.com/webp-sh.png","language":"Go","readme":"\u003cp align=\"center\"\u003e\r\n\t\u003cimg src=\"./pics/webp_server.png\"/\u003e\r\n\u003c/p\u003e\r\n\r\n[![CI](https://github.com/webp-sh/webp_server_go/actions/workflows/CI.yaml/badge.svg)](https://github.com/webp-sh/webp_server_go/actions/workflows/CI.yaml)\r\n[![build docker image](https://github.com/webp-sh/webp_server_go/actions/workflows/release_binary.yaml/badge.svg)](https://github.com/webp-sh/webp_server_go/actions/workflows/release_binary.yaml)\r\n[![Release WebP Server Go Binaries](https://github.com/webp-sh/webp_server_go/actions/workflows/release_docker_image.yaml/badge.svg)](https://github.com/webp-sh/webp_server_go/actions/workflows/release_docker_image.yaml)\r\n[![codecov](https://codecov.io/gh/webp-sh/webp_server_go/branch/master/graph/badge.svg?token=VR3BMZME65)](https://codecov.io/gh/webp-sh/webp_server_go)\r\n![Docker Pulls](https://img.shields.io/docker/pulls/webpsh/webp-server-go?style=plastic)\r\n\r\n[Documentation](https://docs.webp.sh/) | [Website](https://webp.sh/) | [Blog](https://blog.webp.se/)\r\n\r\nThis is a Server based on Golang, which allows you to serve WebP images on the fly.\r\n\r\nCurrently supported image format: JPEG, PNG, BMP, GIF, SVG, HEIC, NEF, WEBP\r\n\r\n\u003e e.g When you visit `https://your.website/pics/tsuki.jpg`，it will serve as `image/webp`/`image/avif` format without changing the URL.\r\n\u003e\r\n\u003e GIF image will not be converted to AVIF format because the converted AVIF image is not animated.\r\n\r\n## Usage with Docker(recommended)\r\n\r\nWe strongly recommend using Docker to run WebP Server Go because running it directly with the binary may encounter issues with `glibc` and some dependency libraries, which can be quite tricky to resolve.\r\n\r\nMake sure you've got Docker and `docker-compose` installed, create a directory and create `docker-compose.yml` file inside it like this:\r\n\r\n```yml\r\nversion: '3'\r\n\r\nservices:\r\n  webp:\r\n    image: webpsh/webp-server-go\r\n    # image: ghcr.io/webp-sh/webp_server_go\r\n    restart: always\r\n    volumes:\r\n      - ./path/to/pics:/opt/pics\r\n      - ./exhaust:/opt/exhaust\r\n      - ./metadata:/opt/metadata\r\n    ports:\r\n      -  127.0.0.1:3333:3333\r\n```\r\n\r\nSuppose your website and image has the following pattern.\r\n\r\n| Image Path                            | Website Path                         |\r\n| ------------------------------------- | ------------------------------------ |\r\n| `/var/www/img.webp.sh/path/tsuki.jpg` | `https://img.webp.sh/path/tsuki.jpg` |\r\n\r\nThen\r\n\r\n* `./path/to/pics` should be changed to `/var/www/img.webp.sh`\r\n* `./exhaust` is cache folder for output images, by default it will be in `exhaust` directory alongside with `docker-compose.yml` file, if you'd like to keep cached images in another folder, you can change  `./exhaust` to `/some/other/path/to/exhaust`\r\n* `./metadata` is cache folder for images' metadata, by default it will be in `metadata` directory alongside with `docker-compose.yml` file\r\n\r\nStart the container using:\r\n\r\n```\r\ndocker-compose up -d\r\n```\r\n\r\nNow the server should be running on `127.0.0.1:3333`, visiting `http://127.0.0.1:3333/path/tsuki.jpg` will see the optimized version of `/var/www/img.webp.sh/path/tsuki.jpg`, you can now add reverse proxy to make it public, for example, let Nginx to `proxy_pass http://127.0.0.1:3333/;`, and your WebP Server is on-the-fly!\r\n\r\n## Custom config\r\n\r\nIf you'd like to use a customized `config.json`, you can follow the steps in [Configuration | WebP Server Documentation](https://docs.webp.sh/usage/configuration/) to genereate one, and mount it into the container's `/etc/config.json`, example `docker-compose.yml` as follows:\r\n\r\n```yml\r\nversion: '3'\r\n\r\nservices:\r\n  webp:\r\n    image: webpsh/webp-server-go\r\n    # image: ghcr.io/webp-sh/webp_server_go\r\n    restart: always\r\n    volumes:\r\n      - ./path/to/pics:/opt/pics\r\n      - ./path/to/exhaust:/opt/exhaust\r\n      - ./path/to/metadata:/opt/metadata\r\n      - ./config.json:/etc/config.json\r\n    ports:\r\n      -  127.0.0.1:3333:3333\r\n```\r\n\r\nYou can refer to [Configuration | WebP Server Documentation](https://docs.webp.sh/usage/configuration/) for more info, such as custom config, AVIF support etc.\r\n\r\n## Advanced Usage\r\n\r\nIf you'd like to use with binary, please consult to [Use with Binary(Advanced) | WebP Server Documentation](https://docs.webp.sh/usage/usage-with-binary/)\r\n\r\n\u003e spoiler alert: you may encounter issues with `glibc` and some dependency libraries.\r\n\r\nFor `supervisor` or detailed Nginx configuration, please read our documentation at [https://docs.webp.sh/](https://docs.webp.sh/)\r\n\r\n## WebP Cloud Services\r\n\r\nWe are currently building a new service called [WebP Cloud Services](https://webp.se/), it now has three parts:\r\n\r\n* [Public Service](https://public.webp.se)\r\n  * GitHub Avatar/Gravater reverse proxy with WebP optimization, for example, change `https://www.gravatar.com/avatar/09eba3a443a7ea91cf818f6b27607d66` to `https://gravatar.webp.se/avatar/09eba3a443a7ea91cf818f6b27607d66` for rendering will get a smaller version of gravater, making your website faster \r\n  * Totally free service and currently has a large number of users, this includes, but is not limited to [CNX Software](https://www.cnx-software.com/), [Indienova](https://indienova.com/en) \r\n* [WebP Cloud](https://docs.webp.se/webp-cloud/)\r\n  * No need to install WebP Server Go yourself, especially suitable for static websites.\r\n  * Image Conversion: WebP Cloud converts images to WebP/AVIF format, reducing size while maintaining quality for faster website loading.\r\n    * Example 1: Original image URL (https://yyets.dmesg.app/api/user/avatar/BennyThink) becomes compressed URL (https://vz4w427.webp.ee/api/user/avatar/Benny).\r\n    * Example 2: Original image URL (https://yyets.dmesg.app/api/user/avatar/BennyThink) becomes a thumbnail image using URL (https://vz4w427.webp.ee/api/user/avatar/BennyThink?width=200).\r\n  * Caching: WebP Cloud automatically caches served images, reducing traffic and bandwidth load on the origin server.\r\n* [Fly](https://webp.se/fly/)\r\n  * We call this service Fly, with the aim of providing a public and free service that users can experience without registering on WebP Cloud.\r\n    As this is a public service, some limitations compared to WebP Cloud are imposed:\r\n\r\n    - Fly supports a maximum original image size of 8MB, while WebP Cloud supports up to 80MB.\r\n    - Fly cache time is 1 day, while WebP Cloud has unlimited time (can be manually cleared at any time).\r\n    - It does not support parameters like `blur`, `sharpen` for image processing.\r\n    - And that’s it.\r\n\r\nFor detailed information, please visit [WebP Cloud Services Website](https://webp.se/) or [WebP Cloud Services Docs](https://docs.webp.se/).\r\n\r\n## Support us\r\n\r\nIf you find this project useful, please consider supporting\r\nus by [becoming a sponsor](https://github.com/sponsors/webp-sh), pay via Stripe, or [try out our WebP Cloud](https://docs.webp.se/webp-cloud/basic/)!\r\n\r\n| USD(Card, Apple Pay and Google Pay)              | EUR(Card, Apple Pay and Google Pay)              | CNY(Card, Apple Pay, Google Pay and Alipay)      |\r\n|--------------------------------------------------|--------------------------------------------------|--------------------------------------------------|\r\n| [USD](https://donate.stripe.com/4gwfZn2RDgag0bScMN) | [EUR](https://donate.stripe.com/28odRfgItgage2IfZ0) | [CNY](https://donate.stripe.com/00geVj8bX3nuf6MeUU) |\r\n| ![](pics/USD.png)                                | ![](pics/EUR.png)                                | ![](pics/CNY.png)                                |\r\n\r\n## License\r\n\r\nWebP Server is under the GPLv3. See the [LICENSE](./LICENSE) file for details.\r\n\r\n","funding_links":["https://github.com/sponsors/webp-sh"],"categories":["Go","Image Processing","置顶"],"sub_categories":["Snippets Manager","04、多媒体处理中心"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebp-sh%2Fwebp_server_go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebp-sh%2Fwebp_server_go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebp-sh%2Fwebp_server_go/lists"}