Socket
Book a DemoInstallSign in
Socket

yhtml5-upload-images

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yhtml5-upload-images

An automated tool for compressing uploaded images

Source
npmnpm
Version
0.2.0
Version published
Maintainers
1
Created
Source

yhtml5-update-images

An automated tool for compressing and optimizing JPEG or PNG images, and then upload to cdn return urls.

压缩图片 => 上传到cdn => 返回url

old workflow

  • 打开 https://tinypng.com/
  • 上传图片
  • 下载到文件夹
  • 打开 上传图片 cdn 地址
  • 上传图片
  • 复制链接

new workflow

  • npm run uploadimg
  • return url

start

create .config.js in the project root directory

const path = require('path')
const entry1 = path.resolve(__dirname, './images/*.{jpg,png}')

const config = {
  upload: {
    entries: [entry1],
  }
}

module.exports = config

npm i yhtml5-upload-images -O npm run uploadimg

notice

  • 每次只上传一个文件 减轻弱不禁风的 node cdn服务器压力

other

imagemin

FAQs

Package last updated on 22 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts