Skip to main content

Converts images to webp from CLI using Python/Pillow.

Project description

Webpify

Webpify is a simple Python application that converts images to the WebP format. It supports various image formats and allows you to customize the quality of the output images.

Features

  • Convert images from common formats (JPEG, PNG, GIF) to WebP.
  • Skip already converted WebP images.
  • Specify custom quality for the WebP images.
  • Flexible input and output directory options.

Installation

pip install webpify

Requirements

  1. Ensure you have Python 3.9 or higher installed.

Usage

Run the application from the command line:

python -m webpify [path] [-o OUTPUT] [-q QUALITY] [-m MIME_TYPES] [-s SKIP_TYPES] [--delete]

Arguments:

  • path: Path to the directory containing images (default: current directory).
  • -o, --output: Output directory for converted images (default: current directory).
  • -q, --quality: Quality of the WebP images (default: 80).
  • -m, --mime-types: List of image MIME types to convert (default: JPEG, PNG, GIF).
  • -s, --skip-types: List of image MIME types to skip (default: WebP).
  • --delete: Delete original files after conversion.

Example:

Convert all images in the images folder to WebP format with 90% quality, save them in the output folder, and delete the original files:

python -m webpify images -o output -q 90 --delete

Dependencies

  • Python >= 3.9
  • Pillow >= 11.1.0, < 12.0.0

License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webpify-1.0.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webpify-1.0.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file webpify-1.0.0.tar.gz.

File metadata

  • Download URL: webpify-1.0.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Windows/11

File hashes

Hashes for webpify-1.0.0.tar.gz
Algorithm Hash digest
SHA256 ae03fc0d604ccd86010c3ca2af598b383cf86dfb998a17990f125a52b4af03c0
MD5 bc9a4948488b9f5042374798e95ef45b
BLAKE2b-256 623253ebe6cf927ab34be7de892b18bdce1b38437f2bad86e13f7f84bdf2936d

See more details on using hashes here.

File details

Details for the file webpify-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: webpify-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.1 CPython/3.13.2 Windows/11

File hashes

Hashes for webpify-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4988e25050ee5e39ed01db4bdf1dc7263209c199b767879cd5bae77363af2447
MD5 a81c46dd3ce1adc069b8a356ef274e2e
BLAKE2b-256 fb3f210dbaf25424c0485bd5bde153c360832d0006951657e9b71652d98057f3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page