0.0.5 • Published 5 years ago
image-simple-resize v0.0.5
Image simple resize
How to use
npm install -D- add image files to a directory.
- import the package
const imgSimpleResizer = require('image-simple-resize') imgSimpleResizerfunction takes 2 arguments:- pathToImages: string use
path.join(__dirname, path_to_your_images) - options: Options
- awsConfig: AWSConfig {bucket: string; accessKeyId: string; secretAccessKey: string;}
- imageSizes: ImageSizes {thumbnail?: number; product?: number; origin?: number;}
- useWebp: boolean
- pathToImages: string use
- see your optimized files in the AWS S3 bucket