Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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

brower-imagemin

前端图片压缩

  • 0.0.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

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

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc