Registry / devops / yoga
library1.3.4pypypi✓ verified 84d ago

Yoga (Yummy Optimizer for Gorgeous Assets) is an image optimizer for Python. It wraps various image optimization tools (pngcrush, pngquant, jpegtran, jpegoptim, svgo, gifsicle) to reduce file sizes. Current version 1.3.4, release cadence is low.

pip install yoga
INSTALL
IMPORT
SIG · YOGA
Y
yoga
devopspythonv1.3.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

optimize
✓ from yoga.image import optimize
✗ from yoga import optimize

Optimizes an image file using yoga's default optimizer.

from yoga import optimize # Optimize a single image optimize('input.png', 'output.png', lossless=True, quality=80) # With pathlib import pathlib optimize(pathlib.Path('input.jpg'), pathlib.Path('output.jpg'))
Debug
Known issues
gotchaExternal tools must be installed separately (e.g., pngquant, jpegtran). Yoga only provides Python bindings; it does not bundle the binaries.
fix
Install required tools: sudo apt-get install pngquant jpegoptim or equivalent for your OS.
affects: all
deprecatedThe argument 'optimizer' in optimize() is deprecated; use 'engine' instead.
fix
Replace optimizer='pngquant' with engine='pngquant'.
affects: >=1.3.0
gotchaThe library may raise a RuntimeError if the external tool is not found or returns an error code.
fix
Catch RuntimeError and check that the necessary optimizer is installed and accessible via PATH.
affects: all
Upgrade
Version history
1.3.4latest on PyPI · released Nov 3, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
22 hits · last 30 days
node
20
Resources
yoga — pip install yoga · libregistry