UNPKG

ts-image-compress

Version:

A tiny library for handling image size.

66 lines (42 loc) • 1.04 kB
# ts-image-compress šŸ“„ Want to reduce the size of your images? <!-- s : svg --> <div style="padding : 40px"> [![Status](https://img.shields.io/badge/status-active-success.svg)]() [![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE) </div> <!-- e : svg --> <!-- s : introduce --> <div> Copy to clipboard React component(Typescript) </div> <!-- e : introduce --> <br/><br/> <!-- s : Getting started --> ## šŸŽÆ Getting started <h3>Install</h3> ```sh npm install ts-image-compress ``` <h3>Import</h3> ```js import { ImageCompress } from "ts-image-compress"; ``` <!-- e : Getting started --> <br/><br/> <!-- s : How to Use --> ## šŸ‘€ How to use <h3>Add this code</h3> ```js import { ImageCompress } from "ts-image-compress"; const handleResizeImage = async (image) => { // Image type must be file const resizeResult = await ImageCompress(image); }; ``` <br/><br/> <!-- s : License --> ## šŸŖ„ License [MIT License](./LICENSE) Copyright 2022. YunMinSeok all rights reserved. <!-- e : License -->