n0vad3v/webp-server

Project ID: 29822

Description

This is a Server based on Golang, which allows you to serve WebP images on the fly. It will convert jpg,jpeg,png files by default, this can be customized by editing the config.json..

e.g When you visit https://a.com/1.jpg´╝îit will serve as image/webp without changing the URL.

For Safari and Opera users, the original image will be used.

Compare to n0vad3v/webp_server

Size

  • webp_server with node_modules: 43M
  • webp_server_go single binary: 15M

Performance

It's basically between ExpressJS and Fiber, much faster than the http package of course.

Convenience

  • webp_server: Clone -> npm install -> run with pm2
  • webp_server_go: Download -> Run

Installation Instructions

Regarding the IMG_PATH section in config.json. If you are serving images at https://example.com/pics/tsuki.jpg and your files are at /var/www/image/pics/tsuki.jpg, then IMG_PATH shall be /var/www/image.

  1. Edit the config.json to face your need, default convert quality is 80%.
  2. Run the binary like this: ./webp_server, use screen or tmux to hold it currently.
  3. Let Nginx to proxy_pass http://localhost:3333/;

Active Releases

The following unofficial repositories are provided as-is by owner of this project. Contact the owner directly for bugs or issues (IE: not bugzilla).

Release Architectures Repo Download
EPEL 7 x86_64 (8)* EPEL 7 (54 downloads)
EPEL 8 x86_64 (9)* EPEL 8 (52 downloads)

* Total number of packages downloaded in the last seven days.