npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

img-resizer-cli

v0.1.4

Published

A command line utility to resize and optimize images

Downloads

14

Readme

Image resizer CLI

This command-line interface helps quickly resize and optimize image files.

Features

  • Resize images quickly and easily
  • Supports resizing of single images or entire folders
  • Optional flags for controlling image quality, file format, and more
  • Easy to use and understand command-line interface

You can specify a file or a folder, along with some optional flags such as quality. lowercase and remove-spaces.

Installation

You can install the Image Resizer CLI tool using npm. To install, simply run the following command:

npm install -g img-resizer-cli

Usage

To resize a single image, run the following command:

npx img-resizer-cli --file <path-to-file> --width <width> --output <path-to-output-folder>

If you want to resize a folder, use the --folder flag instead of --file.

Examples

Here are some examples of how you can use the Image Resizer CLI tool:

# Resizing and optimizing a single image
npx img-resizer-cli --file ~/Photos/example.jpg --width 1000 -q 90 -o ~/Photos/resized/

# Resize all images in a folder and its subdirectories to 500 pixels wide and output to a different folder
npx img-resizer-cli --folder ~/Photos/ --width 500 -o ~/Photos/resized/

# Resize images in a folder to 300 pixels wide, convert to GIF format, and remove spaces from the file names
npx img-resizer-cli --folder ~/Photos/ --width 300 --format gif --remove-spaces

Options

| Option | Description | | ---------------------- | ------------------------------------------------------------------------------------------------------------- | | --file or --folder | Specifies the file name to be processed | | -w | Specifies the width of the output image in pixels | | -o | Specifies the output directory for the processed file. Overwrites the handled file by default if not passed. | | -q | Specifies the quality of the output image on a scale from 1 to 100 | | --format | (Optional) Specifies the file format of the output image. Allowed values: jpg, jpeg, png, gif, webp | | --lowercase | (Optional) Converts the file name to lowercase | | --remove-spaces | (Optional) Removes spaces from the file name |

Contributing

Contributions to this project are welcome! If you find a bug or have an idea for a new feature, please submit an issue or a pull request.

License

This project is licensed under the Mozilla Public License 2.0.