Socket
Socket
Sign inDemoInstall

@ssthouse/img-compress

Package Overview
Dependencies
72
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ssthouse/img-compress

### How to use


Version published
Maintainers
1
Install size
5.78 MB
Created

Readme

Source

Cli image compress tool powered with Tinyjpg

How to use

  1. First install this node cli tool with: (note: you need have node installed first, if not, please check: node.js)
npm install -g @ssthouse/img-compress
  1. To use this cli tool, you wil need a developer-key from tinyjpg.(free with 500 times per month)

please check this page to get your key: https://tinyjpg.com/developers

  1. After that, fill in your api-key with:
img-compress init -key _your_personal_api_key_
  1. That's it, you can start compress your images with one simple cmd:
img-compress ./test.png

使用方式

  1. 安装该命令行工具

    npm install -g @ssthouse/img-compress
    
  2. 设置 API key (注: API key 需要在 tiniyjpg网站 进行申请, 提供用户名和邮箱即可得到一个 500次/ 每月 的key)

    img-compress init -key your_api_key
    
  3. 如果你的terminal网络需要使用代理的话, 需要进行设置:

    img-compress proxy http://example.com
    
  4. 开始压缩图片

    img-process img_file
    

    命令执行成功后会在原图的同一目录看到压缩过的图片文件. 文件名以 __compress.文件后缀 结尾. 如: test.png => test_compress.png

FAQs

Last updated on 27 Oct 2019

Did you know?

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc