Skip to main content

img2webp

A tool to convert images to WebP format with both GUI and CLI interfaces.

Features

  • Convert multiple images to WebP format
  • Support for HEIC, JPG, JPEG, and PNG formats
  • Adjustable compression/quality level
  • Both GUI and CLI interfaces
  • Progress tracking
  • Batch processing support

Installation

pip install img2webp

Usage

Graphical Interface

Run the GUI converter by executing:

img2webp

Or in Python:

from img2webp.gui import main
main()

Command Line Interface

The CLI version provides various options for converting images:

# Convert a single file
img2webp-cli input.jpg -o output_dir

# Convert multiple files
img2webp-cli input1.jpg input2.png -o output_dir

# Set quality level (1-100)
img2webp-cli input.jpg -o output_dir -q 90

# Convert all supported images in a directory
img2webp-cli directory/*.jpg -o output_dir

# Enable verbose output
img2webp-cli input.jpg -o output_dir -v

Python API

You can also use the package programmatically:

from img2webp import convert_image, process_files

# Convert a single image
convert_image("input.jpg", "output.webp", quality=80)

# Convert multiple images
successful, failed = process_files(
    ["input1.jpg", "input2.png"],
    "output_directory",
    quality=80
)

License

This project is licensed under the MIT License - see the LICENSE file for details.

Metadata

Release files for img2webp 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for img2webp 0.1.1
File Size Uploaded
img2webp-0.1.1.tar.gz 8.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for img2webp 0.1.1
File Interpreter ABI Platform
img2webp-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.5 kB

Release files / img2webp-0.1.1.tar.gz

Download URL img2webp-0.1.1.tar.gz
Size 8.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ce73461c131d200257d3ca8a2306ce0d24a1b53200c2ca63a701a3a9a9644e85
BLAKE2b-256 checksum
How to use checksums
44c17db2346a32345cd19fd63ada0674eace8f0a9e2d77c364983320a7b20996
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / img2webp-0.1.1-py3-none-any.whl

Download URL img2webp-0.1.1-py3-none-any.whl
Size 7.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f47ad6ed1e9383ed36d7d415a232f7a7b0b3b6fe6cfd05a6aabe960ab3ec5ec1
BLAKE2b-256 checksum
How to use checksums
0eb22e495020ae0d7b62b30c82acea32c9fe15af7978f1acb42638455e8f3d90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page