Skip to content

Latest commit

 

History

History
185 lines (127 loc) · 4.99 KB

File metadata and controls

185 lines (127 loc) · 4.99 KB

Webpify

Webpify is a terminal tool written in Node.js that converts your PNG, JPG, HEIC, and HEIF images to WebP, a modern format that reduces file size while preserving visual quality, ideal for web performance.

npm version npm downloads license

⭐ 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

📷 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.

💻 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

🐳 Docker

Webpify is also available as a Docker image for automated workflows and CI/CD pipelines.

Docker Version Docker Pulls Docker Stars

docker pull alejandrobr/webpify:latest

Note

Interactive mode is not supported in Docker. Use --auto or --input instead.

📚 More Information

For more information, visit the Wiki.

📚 Other Languages

🙌 Author

Alejandro Barrionuevo Rosado

MIT License – © 2025-2026