Socket
Book a DemoInstallSign in
Socket

@yhtml5/upload-images

Package Overview
Dependencies
Maintainers
3
Versions
5
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

latest
Source
npmnpm
Version
0.6.9-beta.1
Version published
Maintainers
3
Created
Source

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

  • 每次只上传一个文件 减轻的服务器压力

other

imagemin

Keywords

check list

FAQs

Package last updated on 17 Jun 2021

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