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

@madnh/image-transform

v0.0.4

Published

Transform your images

Downloads

3

Readme

Image Transform

CLI to help you to transform your images.

Usage

$ npm install -g @madnh/image-transform
$ image-transform COMMAND
running command...
$ image-transform (--version|--version|-v)
@madnh/image-transform/0.0.4 darwin-arm64 node-v18.17.0
$ image-transform --help [COMMAND]
USAGE
  $ image-transform COMMAND
...

Commands

image-transform help [COMMANDS]

Display help for image-transform.

USAGE
  $ image-transform help [COMMANDS] [-n]

ARGUMENTS
  COMMANDS  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for image-transform.

See code: @oclif/plugin-help

image-transform transform [FILE]

Transform images.

USAGE
  $ image-transform transform [FILE] [-c <value>] [-p <value>] [--withEnlargement] [-w <value>] [-h <value>]
    [--nameFormat <value>] [--nameRemove <value>] [--jpg] [--png] [--webp] [--avif] [--keepMeta] [-o <value>] [--watch]
    [--watchInitial] [--concurrency <value>] [-d <value>] [--quality <value>]

ARGUMENTS
  FILE  Images to transform, maybe single file, dir or glob pattern. Can ignore if use `--profile`

FLAGS
  -c, --configFile=<value>  [default: image-transform.config.json] Config file path
  -d, --data=<value>...     Data to pass to filename format, can be multiple, informat of `key=value`, example: `--data
                            name=abc --data age=20`
  -h, --height=number       Resize height, default is auto scale with width
  -o, --out=<value>         Output directory, if omit then use the same directory with input file
  -p, --profile=<value>     Profile name
  -w, --width=number        Resize width, default is auto scale with height
  --avif                    Export to avif
  --concurrency=<value>     [default: 1] Number of concurrent transform
  --jpg                     Export to jpg
  --keepMeta                Keep image meta data
  --nameFormat=<value>      [default: {name}.{ext}] Format of output file name
  --nameRemove=<value>      Remove part of file name
  --png                     Export to png
  --quality=<value>         [default: 90] Quality of output image, override defined value in profile.
                            Useful to reduce file size manually, use with "--data" flag to add versioning, example:
                            "--quality 80 --data version=1"
  --watch                   Watch file changes
  --watchInitial            Watch file changes, and run initial transform for current file
  --webp                    Export to webp
  --withEnlargement         Allow image enlargements

DESCRIPTION
  Transform images.

  Name format:
  {name} - new name (without ext)
  {ext} - new extension
  {orgName} - original file name
  {orgExt} - original file extension


EXAMPLES
  $ image-transform transform --profile apple-icons

  $ image-transform transform --profile apple-icons --config images-transform.json

  $ image-transform transform images/image-1.jpg --webp

  $ image-transform transform images/image-1.jpg --webp --width 500 --out images/optimized

  $ image-transform transform images/image-1.jpg --avif --png --height=300

  $ image-transform transform images/image-1.jpg -w 1000 --webp --avif --png --name-format='{name}@2x.{ext}'

  $ image-transform transform images/image-1.jpg --webp --name-remove=__raw

See code: dist/commands/transform.ts