npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lilingyun132/imgmin

v1.0.6

Published

这是个依赖nodejs的右键菜单图片压缩工具

Downloads

12

Readme

@lilingyun132/imgmin

简介

  • 基于nodejs + tinify的图片压缩工具

  • 支持格式:png, jpeg, webp

  • 支持压缩方式(1):命令行压缩

  • 支持压缩方式(2):目录/单文件/多文件 右键菜单压缩

  • 目前仅支持Window,没有调试Mac

安装

$ npm install @lilingyun132/imgmin -g

初始化

$ imgmin init [your tinify key]

(1)为什么要初始化?

为了省去每次打开命令工具敲命令的步骤,工具支持以右键菜单模式压缩图片;增加右键菜单需要修改电脑注册表,所以需要执行init命令进行执行添加注册表,这也是为什么此命令需要:

【以管理员打开CMD执行此命令】

(2)不初始化?

可以。不初始化将不会修改注册表,也就意味着工具只能以命令行方式压缩

(3)初始化后面的Key参数可以不加?

如果只是体验,可以不配置,实际压缩中务必配置。因为默认使用了作者的KEY,如果所有人共用一个KEY,每个月500张的限制将很快用完,所以请务必使用之前前往 https://tinypng.com/ 注册账号免费申请API KEY

(4)初始化的时候没有加key,后面怎么加

# 设置你的KEY
$ imgmin setkey *****

使用

(1)右键菜单压缩

  • 目录下右键菜单压缩

进入目录下,找到“压缩目录下所有图片”,点击即可

截图

  • 单文件或选择多文件压缩

点击单个文件,或者选择多个文件,右键菜单找到“压缩图片”,点击压缩

注意:如果选中的文件不属于支持的格式范围,将不会显示压缩菜单

(2)命令行压缩

  • 目录所有图片压缩
# 压缩执行目录下的所有符合支持格式的图片
$ imgmin min
  • 特定名字图片压缩
# min命令后面更着图片名称,以空格分割,将压缩执行目录下这些图片
$ imgmin min 1.png 2.jpg 3.webp