Socket
Book a DemoInstallSign in
Socket

brower-imagemin

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

brower-imagemin

前端图片压缩

0.0.1
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

前端图片压缩

使用blob和image对象,通过canvas方便的实现了前端的图片压缩

Install

By Tag

<script src="the link of brower-imagemin"></script>

By Npm

npm install --save brower-imagemin

Use

By Tag

there is a demo in example folder

By Npm

import imagemin from 'imagemin'

...

var file = document.getElementById('file');
file.addEventListener('change', {mimeType: 'image/jpeg', quality: 0.1}, e => {
    imagemin(e.target.files[0], blob => {
        console.log(blob);
    })
})

FAQs

Package last updated on 12 Oct 2018

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

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.