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-2.0.0.tar.gz (4.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-2.0.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: webpify-2.0.0.tar.gz
  • Upload date:
  • Size: 4.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-2.0.0.tar.gz
Algorithm Hash digest
SHA256 eda39590e16a923e99d84ece65e8a37999c2c57cd93507348c175685c1129029
MD5 bc70ad4f68fb48e57ef755228c6e9914
BLAKE2b-256 8fe0e085948a0415e38739a19b431a5e68a1c4d3aa0e449dfc5b8b78e3136fe0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: webpify-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.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-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7eebaba7dfdde766bfb44c206b15e0450514d88501d6ac5dcd51187bb7086a3d
MD5 517dfd38fc1f90b437e4f535a8975345
BLAKE2b-256 749e7008d2adc4fe0caf8cc404ec0a77aedcbaa1fd1956ad075fe1b9baf2867d

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