{"id":46844,"library":"yoga","title":"yoga","description":"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.","status":"active","version":"1.3.4","language":"python","source_language":"en","source_url":"https://github.com/wanadev/yoga","tags":["image-optimization","png","jpeg","svg","gif"],"install":[{"cmd":"pip install yoga","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"wrong":"from yoga import optimize","symbol":"optimize","correct":"from yoga.image import optimize"}],"quickstart":{"code":"from yoga import optimize\n\n# Optimize a single image\noptimize('input.png', 'output.png', lossless=True, quality=80)\n\n# With pathlib\nimport pathlib\noptimize(pathlib.Path('input.jpg'), pathlib.Path('output.jpg'))","lang":"python","description":"Optimizes an image file using yoga's default optimizer."},"warnings":[{"fix":"Install required tools: sudo apt-get install pngquant jpegoptim or equivalent for your OS.","message":"External tools must be installed separately (e.g., pngquant, jpegtran). Yoga only provides Python bindings; it does not bundle the binaries.","severity":"gotcha","affected_versions":"all"},{"fix":"Replace optimizer='pngquant' with engine='pngquant'.","message":"The argument 'optimizer' in optimize() is deprecated; use 'engine' instead.","severity":"deprecated","affected_versions":">=1.3.0"},{"fix":"Catch RuntimeError and check that the necessary optimizer is installed and accessible via PATH.","message":"The library may raise a RuntimeError if the external tool is not found or returns an error code.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'1.3.4':32 'asset':7 'cadenc':34 'current':30 'file':28 'gif':43 'gifsicl':25 'gorgeous':6 'imag':10,17,38 'image-optim':37 'jpeg':41 'jpegoptim':23 'jpegtran':22 'low':36 'optim':4,11,18,39 'png':40 'pngcrush':20 'pngquant':21 'python':13 'reduc':27 'releas':33 'size':29 'svg':42 'svgo':24 'tool':19 'various':16 'version':31 'wrap':15 'yoga':1,2 'yummi':3","created_at":"2026-06-07T13:01:54.829441+00:00","updated_at":"2026-06-07T13:01:54.829441+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/wanadev/yoga","github":"https://github.com/wanadev/yoga","docs":null,"changelog":null,"pypi":null,"npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}