Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/megaads-vn/image-storage-utils
https://github.com/megaads-vn/image-storage-utils
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/megaads-vn/image-storage-utils
- Owner: megaads-vn
- License: mit
- Created: 2023-11-15T07:25:11.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-10T03:17:46.000Z (29 days ago)
- Last Synced: 2024-12-10T04:22:04.458Z (29 days ago)
- Language: JavaScript
- Size: 8.79 KB
- Stars: 0
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Image Storage Utils
Utils for fetching, processing and storing image files
## Examples
```
const defaultOptions = {
allowStorage: true,
storagePath: 'storage/images',
imageSizes: ['1200x0', '960x960', '96x96', '320x320', '180x180', '160x160', '250x250', '80x80', '400x600', '540x540', '255x255']
};
const imageStorageUtils = new (require('image-storage-utils'))(defaultOptions);let imageBuffer = await imageStorageUtils.loadImage(url);
let fitImageSize = imageStorageUtils.fitImageSize("600x600");
```