Giter Site home page Giter Site logo

super-tinypng's Introduction

初衷

tinypng 网页版,其实是挺方便的。但是他有上传图片数量的限制,比如每天只能上传 20 张,如果超过这个数量,就会断断续续的出现 Too many files uploaded at once 错误 。所以才决定使用 Node 来开发一个绕过数量限制的 npm 包。

使用方法

安装:

npm i super-tinypng -g # or yarn global add super-tinypng

然后,在命令行进入到你想要压缩图片的目录,执行:

super-tinypng

说明

  • tinypng 默认是会对用户上传数量有限制的,使用了 X-Forwarded-For 头绕过该限制
  • 为了简化,不可以递归遍历文件夹
  • 为了简化,不支持配置,只能压缩当前目录下的图片,并且会在当前目录下创建一个 output 目录,把压缩成功的图片放到里面

免责声明

该仓库仅用于学习,如有商业用途,请购买官方的 pro 版:https://tinify.com/checkout/web-pro

This Repo is only for study.

super-tinypng's People

Contributors

zhanyuzhang avatar andyskaura avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.