https://github.com/runningdeveloper/image-resize-folder
Simple thing to resize a bunch of images in folder
https://github.com/runningdeveloper/image-resize-folder
Last synced: about 1 year ago
JSON representation
Simple thing to resize a bunch of images in folder
- Host: GitHub
- URL: https://github.com/runningdeveloper/image-resize-folder
- Owner: runningdeveloper
- Created: 2019-01-19T19:44:57.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-01-19T20:01:09.000Z (over 7 years ago)
- Last Synced: 2025-01-16T03:42:59.463Z (over 1 year ago)
- Language: JavaScript
- Size: 9.77 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Resize images in a folder
## Super basic thing for #100DaysOfCode
# Install
```
$ git clone https://github.com/runningdeveloper/image-resize-folder.git
$ cd image-resize-folder
$ npm i
```
# Usage
Change these variables in the index.js file
```
const inputDir = '/Users/geoffreyhunt/Desktop/image-test/in'
const outputDir = '/Users/geoffreyhunt/Desktop/image-test/out'
const size = {width: 1600, height: 1200, type: 'cover', quality: 80} // type: https://sharp.pixelplumbing.com/en/stable/api-resize/
```
Then you can run it with
```
$ node .
```