All Projects → webp-sh → webp_server_node

webp-sh / webp_server_node

Licence: other
Node version of WebP Server. A tool that will serve your JPG/PNGs as WebP format with compression, on-the-fly,

Programming Languages

javascript
184084 projects - #8 most used programming language
Dockerfile
14818 projects

Labels

Projects that are alternatives of or similar to webp server node

webpjs
📷 WebP.js Polyfill
Stars: ✭ 25 (+31.58%)
Mutual labels:  webp
wa-sticker-formatter
Sticker Creator for WhatsApp
Stars: ✭ 60 (+215.79%)
Mutual labels:  webp
webp-wasm
Webp image convertor (webassembly, works offline in browser)
Stars: ✭ 18 (-5.26%)
Mutual labels:  webp
togglific
Do you find web animations distracting? Togglific provides a distraction-free web experience!
Stars: ✭ 17 (-10.53%)
Mutual labels:  webp
image-optimizer
A free and open source tool for optimizing images and vector graphics.
Stars: ✭ 740 (+3794.74%)
Mutual labels:  webp
FroshWebP
WebP Support for Shopware
Stars: ✭ 29 (+52.63%)
Mutual labels:  webp
imagecodecs
Image transformation, compression, and decompression codecs. Forked from https://pypi.org/project/imagecodecs
Stars: ✭ 56 (+194.74%)
Mutual labels:  webp
imei
IMEI - ImageMagick Easy Install
Stars: ✭ 126 (+563.16%)
Mutual labels:  webp
AndroidWebP-GradlePlugin
将图片转换成WebP格式的Android构建插件,自动下载 libwebp,支持手动转换与自动转换两种模式。
Stars: ✭ 49 (+157.89%)
Mutual labels:  webp
tiny
compress data for better performance
Stars: ✭ 21 (+10.53%)
Mutual labels:  webp
JayantGoel001.github.io
My Personal Portfolio.
Stars: ✭ 31 (+63.16%)
Mutual labels:  webp
go-webp
Simple and fast webp library for golang
Stars: ✭ 91 (+378.95%)
Mutual labels:  webp
create-optimize-images
♻️ Reusable, scalable, bash scripts to create and optimize images.
Stars: ✭ 39 (+105.26%)
Mutual labels:  webp
sail
The missing small and fast image decoding library for humans (not for machines) ⛵ https://sail.software
Stars: ✭ 206 (+984.21%)
Mutual labels:  webp
imagor
Fast, Docker-ready image processing server in Go and libvips
Stars: ✭ 2,276 (+11878.95%)
Mutual labels:  webp
gfxprim
Open-source modular 2D bitmap graphics library with emphasis on speed and correctness.
Stars: ✭ 32 (+68.42%)
Mutual labels:  webp
WhatsApp-Stickers
WhatsApp Stickers Pack For WhatsApp
Stars: ✭ 18 (-5.26%)
Mutual labels:  webp
FrameSequence
android java animate webp and gif support
Stars: ✭ 15 (-21.05%)
Mutual labels:  webp
Swift-WebP
A thin Swift wrapper of libwebp to make your own encoder/decoder app
Stars: ✭ 135 (+610.53%)
Mutual labels:  webp
IosCodeSpecification
Ios best practices, Ios development specification, ios 开发规范,ios 最佳实践,ios编码规范
Stars: ✭ 43 (+126.32%)
Mutual labels:  webp

THIS PROJECT IS UNDER DEVELOPMENT, DON'T USE IT ON PRODUCTION ENVIRONMENT.

This is a NodeJS Server based on Express and cwebp, which allows you to serve WebP images on the fly.

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.

Usage(Docker)

If you've docker installed, you can try build the package by doing as follows(don't worry, it's simple):

  1. Download the docker-compose.yml file to a folder you like, let's say /home/nova/server1/.
  2. Edit the docker-compose.yml, at line 10 ./INTAKE to the directory which contains your images.
  3. run docker-compose up -d in that folder, this will run WebP Server with some parameters written in the docker-compose.yml and create the related folders.
  4. Configure a NGINX server to reverse proxy it for public use.

That't it, the supervision and fail-over is handled by Docker Daemon, no more PM2s or NPMs are needed, Yay!

Or, if you like the traditional way, see below.

Usage(Traditional)

Make sure you've installed node on your system, and the version of it shall be greater than 10, it will convert jpg,jpeg,png files by default, this can be customized by editing the config.js.

  1. Clone the repo and run npm install in it.
  2. Make Sure you've install pm2, if not, use npm install pm2 -g
  3. Define your pics folder on config.js (for instance there is a 1.jpg in the related pic folder):
    IMG_PATH: "/PATH/TO/pics",
    
  4. Run the APP with pm2 start ecosystem.config.js --env production, as this is a temporary solution to suppress errors, this should be fixed on later commits.
  5. Let Nginx to proxy_pass http://localhost:3333/;

Detailed deploy instruction on a systemd based distros

The following examples is tested under Ubuntu 18.04.

1. Install node

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

2. Clone and install deps

Refer to the previous usage section.

3. Add users

useradd -s /usr/sbin/nologin webp
groupadd webp
chown webp:webp -R /opt/webp_server/

4. systemd service

cp ./webp.service /lib/systemd/systemd/
systemctl daemon-reload
systemctl enable webp.service
systemctl start webp.service

5. Nginx configuration

Suppose you're using Wordpress and would like to serve Media images locate and edit your nginx configuration as follows

location ^~ /wp-content/uploads/ {
        proxy_pass http://127.0.0.1:3333;
}

where wp-content/uploads is your image path.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].