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 🙏

© 2026 – Pkg Stats / Ryan Hefner

imgoptim-cli

v1.0.4

Published

Optimiza imágenes desde la línea de comandos

Downloads

3

Readme

Image Optimizer CLI

Description

Image Optimizer CLI is a command-line tool to optimize images in your file system. It uses sharp to perform image manipulation, allowing you to easily convert, resize, and compress images.

Features

  • Command-line image optimization.
  • Support for multiple output formats: jpg, png, webp.
  • Control over image quality.
  • Image resizing with aspect ratio options.
  • Specification of the output folder for optimized images.

New Features

  • Support for SVG optimization using svgo.
  • Real-time progress display with a fixed message showing the current image being processed.
  • Option to display or hide the results table using the --show-table flag.

Installation

  1. Install from npm:

    npm install -g imgoptim-cli
  2. Verify the installation:

    imgoptim --help

Usage

Once installed, you can use the imgoptim command from any directory in your terminal.

imgoptim --format <format> --quality <quality> --width <width> --height <height> --aspect <aspect> --folder <folder> --preserve-format --show-table

Options

-f, --format : Output format of the image. Options: jpg, png, webp. Default: jpg.

-q, --quality : Quality of the output image (1-100). Default: 80.

-w, --width : Width of the output image. Default: original width.

-h, --height : Height of the output image. Default: original height.

-a, --aspect : Aspect ratio adjustment mode. Options: scale, crop, false. Default: scale.

scale: Scale the image, maintaining the aspect ratio.

crop: Crop the image to fit the dimensions, maintaining the aspect ratio.

false: Do not maintain the aspect ratio; stretch the image.

-o, --folder : Output folder for the optimized images. Default: optimized_images.

--preserve-format: Keeps the original format of each image when no other format is specified.

--show-table: Displays the results table at the end of the process. Default: false.

Examples

Optimize all images in the current directory to webp format, with 70 quality, a width of 1000px, and save them in the "optimized" folder, while showing the results table:

imgoptim --format webp --quality 70 --width 1000 --folder optimized --preserve-format --show-table

Optimize all images in the current directory without displaying the results table:

imgoptim --format webp --quality 70 --width 1000 --folder optimized --preserve-format