Skip to content

Webpify is a terminal tool that converts your PNG, JPG, HEIC, and HEIF images to WebP, an optimized image format that offers lossless compression ideal for the web.

License

Notifications You must be signed in to change notification settings

Alejandro-BR/Webpify-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webpify

Webpify is a terminal tool written in Node.js that converts your PNG, JPG, HEIC, and HEIF images to WebP, an optimized image format offering lossless compression ideal for the web.

Turn your photos into lighter, faster-loading images!

npm version license downloads

⭐ Features

  • Fast and efficient conversion of PNG and JPG images to WebP.
  • Support for HEIC and HEIF formats, converted first to JPG and then to WebP.
  • Easy to use via the command line.
  • Multi-language support: Full support for English and Spanish.
  • Input and output path control: Define input/output folders directly from the CLI using flags.
  • Command-line help and version display: Use --help to see available options and --version to check the current version of the tool.
  • Automatic mode to convert images in the current terminal directory using --auto.
  • Display project and author information using --about.
  • Improved CLI experience: Clear and intuitive commands with flags like --input, --output, --es, --auto, etc.
  • Image optimization to improve the performance of your websites.

Preview

Home

💻 Installation

To install Webpify globally on your system, run the following command:

npm i -g webpify-cli

This will install Webpify globally, allowing you to use it from any terminal directory by simply typing:

webpify

If you prefer not to install it globally, you can also run it using npx:

npx webpify-cli

🛠️ Usage

You can use Webpify in two ways: via an interactive mode (without any flags) or through command-line options.

Interactive Mode (no flags)

Simply run the command without any flags and Webpify will guide you step-by-step through an interactive menu:

webpify

Commands and Options

  • --input "<path>"
    Automatically converts all images in the specified folder.

    webpify --input "path/to/images"
  • --output "<path>"
    Sets a custom folder to save the converted images.
    Can be combined with:

    • --input
    • --auto
    • Interactive mode
    webpify --input "path/to/images" --output "path/to/converted"
    webpify --auto --output "path/to/webp"
    webpify --output "path/to/output"
  • --auto
    Automatically converts all images in the current working directory without showing the menu.
    Example:

    webpify --auto
  • --es
    Switches the interface language to Spanish.
    Can be used with any other flag:

    webpify --es
  • --about
    Displays author and project information:

    webpify --about
  • --version or -V
    Shows the current version of Webpify:

    webpify --version
  • --help or -h
    Displays help and available commands:

    webpify --help

ℹ️ Note: If your file paths contain spaces, wrap them in double quotes (" ").

📁 Supported Formats

Input Format Output Format
PNG WebP
JPG / JPEG WebP
HEIC JPG (intermediate) → WebP
HEIF JPG (intermediate) → WebP

📷 Visual Comparison

Here’s a visual example showing the impact of Webpify using the Sharp library:

Original (JPG) Converted (WebP)
Original JPG WebP version
Size: 465 KB Size: 200 KB

WebP reduces image size by up to 70% without noticeable quality loss, improving loading speeds for your web projects.

🚀 What's New in Version 2.0.0

  • Improved architecture.
  • Multiple language support (English and Spanish).
  • New automatic mode with the --auto flag.
  • Improved CLI with new flags: --input, --output, --es, --about.
  • Added user-friendly version (--version / -V) and help (--help / -h) commands.
  • Improved user experience with interactive and non-interactive modes.

📚 Other Languages

🙌 Credits

Alejandro Barrionuevo Rosado

MIT License – © 2025

About

Webpify is a terminal tool that converts your PNG, JPG, HEIC, and HEIF images to WebP, an optimized image format that offers lossless compression ideal for the web.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published