Koa(Dockerfile)Express(Dockerfile)
--maxAgeCache-Control:public,max-age=31536000--defalut-img默认图片--jwt-secret密钥--jwt-algorithm密钥算法--instance实例数量
docker run -d --name node-image -p 3000:3000 -v /tmp/logs/images:/data/logs/images -v /data/images:/data/images buzzxu/node-image-server:latest --jwt-secret 123456 --jwt-algorithm HS512
npm install pm2 -g
yum install libpng libjpeg
http://www.imagemagick.org/download/delegates/
tar xvfz jpegsrc.v9b.tar.gz
cd jpeg-9b
./configure --enable-shared --prefix=$CONFIGURE_PREFIX
make
make install
libpng-1.6.31.tar.xz
./configure
yum info libwebp
brew instal webp
brew install imagemagick --with-webp
cd /usr/local/src
wget https://www.imagemagick.org/download/ImageMagick.tar.gz
tar xvfz ImageMagick.tar.gz
cd ImageMagick
export CPPFLAGS=-I/usr/local/include
export LDFLAGS=-L/usr/local/lib
./configure --prefix=/usr/local --disable-static --with-modules --without-perl --without-magick-plus-plus --with-quantum-depth=8 --disable-openmp
make
sudo make install
make uninstall
POST 127.0.0.1:7589/images/upload
Content-Type: form-data
files: FILE
文件
folder:STRING
文件目录
gif:Number
多张图片是否转gif,每一帧的播放时间(秒)
loop:Number
循环多少次
webp:STRING (convert|add)
convert:转换为webp格式文件
add: 多生成一张webp文件
DELETE http://127.0.0.1:7589/images/delete?file={文件路径}
GET http://127.0.0.1:7589/images/:folder+/:filename?size={宽*高}&quality={质量:Number}&format={格式}&Line{渐进式}
folder:目录 /a/b/c/
filename:文件名
支持参数
yarn upgrade-interactive --latest