png-upload-optimizer
Version:
Simple PNG Image Upload optimizer for frontend that scales your image as per your usability
17 lines (12 loc) • 546 B
Markdown
[](https://github.com/amanshrt/png-optimizer) is the simple solution for optimizing the upload of the png files by scaling down the image as per your command.
1. Converts the uploaded file to string URL
2. Then converts it to HTMLPageElement
3. After that, it converts image to canvas and main resizing/scaling task is done here.
4. Converts back to Unit8Array and back to png file
`npm i png-upload-optimizer `
or,
`yarn add png-upload-optimizer`