browser-image-compression

(β˜… 1,713)

Image compression in web browser

  • .babelrc
  • .eslintrc.js
  • .gitignore
  • .mocharc.js
  • .npmignore
  • .nycrc
  • .travis.yml
  • CHANGELOG.md
  • LICENSE
  • package.json
  • README.md
  • rollup.config.js
  • yarn.lock

# Installation Guide

1. Get the code
git clone https://github.com/Donaldcwl/browser-image-compression

Downloads the entire project code from GitHub to your computer.

cd browser-image-compression

Moves into the project folder you just downloaded.

2. Node.js

Easy Recommended
Prerequisites
  • Git Needed to download the project code from GitHub.
  • Node.js Node.js must be installed to use npm. The LTS version is recommended.
npm install browser-image-compression --save

Downloads and installs the libraries listed in package.json.

yarn add browser-image-compression

Type this command into your terminal and run it.

<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/browser-image-compression@2.0.2/dist/browser-image-compression.js"></script>

Type this command into your terminal and run it.

libURL: string, // optional, the libURL of this library for importing script in Web Worker (default: https://cdn.jsdelivr.net/npm/browser-image-compression/dist/browser-image-compression.js)

Type this command into your terminal and run it.

βœ… After running the command, open the address shown in the terminal (usually something like http://localhost:3000) in your browser.

Pulled directly from this repo's README.

// repository documentation