Skip to content

clefayomide/image-resizer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Resizer

supported node versions license: MIT

Without limiting the user to specific file sizes, users can upload a file or document from the frontend to the backend server; image resizer will handle the resizing without losing its quality.

Getting started

Installation

This package can be installed using npm

npm i @clefayomide/image-resizer

or, yarn

yarn add @clefayomide/image-resizer

Usage

Import image_resize

import { image_resize } from '@clefayomide/image-resizer';

Wrapping things up

const file = e.target.files[0];
image_resize(file, 500)
  .then(res => {
    // perform an action with the resized file, such as sending to server
  })
  .catch(err => console.error(err));

Arguments

Available props:

Argument Description type
file the file to be resized File
width the required width for the new file number

Issues

If any issues are found, they can be reported here.

License

This project is licensed under the MIT license.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published