Socket
Socket
Sign inDemoInstall

batch-crop

Package Overview
Dependencies
3
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    batch-crop

A cli tool to resize/crop all images in a given folder...


Version published
Maintainers
1
Created

Readme

Source

batch-crop

A cli tool to resize and/or crop all images in a given folder and generate a json file with all image names, and their dimensions, filesizes etc.

Uses sharp for image editing, so it shouldn't require any external dependencies.

Installation

npm i batch-crop -g

Usage

Will start an interactive prompt if called without required arguments.

batch-crop

or

batch-crop -i ./images -o ./resized-images -w 256 -h 256

Possible arguments are:

input
-i ./images

Path to folder with images.

output
-o ./resized-images

Path to folder where new images are saved. Will be created if it doesn't exist.

width
-w 256

Max width of image.

height
-h 256

Max height of image.

cropping
-c false

Cropping - true or false. Default is true.

naming
-n numerical

Naming convention. Can be same or numerical. Default is same.

createJson
-j

Create JSON with image data. Default is false.

forceInteractive
-f

Force interactive prompt even if arguments has been supplied in command line. Default is false.

FAQs

Last updated on 15 May 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc