@yhtml5/upload-images
v0.6.9-beta.1
Published
An automated tool for compressing uploaded images
Downloads
2
Readme
yhtml5-update-images
An automated tool for compressing and optimizing JPEG or PNG images, and then upload to cdn return urls.
- Compress picture
- Upload images to cdn
- Return url
start
Create .config.js under the picture folder
Read the config in the root directory by default
const path = require('path')
const entry1 = path.resolve(__dirname, './images/*.{jpg,png}')
const config = {
upload: {
entries: [entry1],
}
}
module.exports = config
use in the global
npm i @yhtml5/upload-images -g upload /path/to/config.js
old workflow
- open https://tinypng.com/
- upload images
- download images
- open upload images tool
- upload images
- copy image link
new workflow
- npm run upload
- return url
notice
- 每次只上传一个文件 减轻的服务器压力