# img-compress-file

> file图片类型压缩生成file用于压缩图片上传

Latest version **1.0.1** (published 2020-09-17) · ISC license · 0 weekly downloads

## Install

```sh
npm install img-compress-file
pnpm add img-compress-file
yarn add img-compress-file
bun add img-compress-file
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2020-09-17 |
| First published | 2020-09-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 6.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | nieyao |
| Maintainers | lovecodeing |
| Keywords | img, compress |

## Links

- npm: https://www.npmjs.com/package/img-compress-file
- npm.io page: https://npm.io/package/img-compress-file

## Alternatives

- [lodash.startswith](https://npm.io/package/lodash.startswith.md) — 769.7K weekly downloads
- [@tarojs/service](https://npm.io/package/@tarojs/service.md) — 33.9K weekly downloads
- [io.extendreality.tilia.indicators.spatialtargets.unity](https://npm.io/package/io.extendreality.tilia.indicators.spatialtargets.unity.md) — 131 weekly downloads
- [@rtarojs/taro](https://npm.io/package/@rtarojs/taro.md) — 90 weekly downloads
- [node-branch-io](https://npm.io/package/node-branch-io.md) — 50 weekly downloads

## Recent versions

- 1.0.1 (latest) — 2020-09-17
- 1.0.0 — 2020-09-15

## README

# 图片压缩插件 img-compress-file
## 使用
```
npm i img-compress-file
```

```
import compressImg from 'img-compress-file'

/**
 * 
 * @param {*} file 
 * @param {*} qualit 压缩质量 0-1
 * @param {*} isAutoCompress  是否自动压缩 开启自动压缩后 quality无效
 * @param {*} callback  回调函数 返回压缩后的file
 */
compressImg(file,1,true,function (comPressFile) {
    //得到压缩文件后的操作
    console.log(comPressFile);
});

```

## [github](https://github.com/LoveEocding/img-compress.git)

---
_Source: https://npm.io/package/img-compress-file · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
