Skip to main content

Sphinx Extension: Image Minimizer

PyPI PyPI - License

Description

This Sphinx extension allows for automatically minimizing build dir images, most useful when only used for CI.

Setup

  1. Add the following to your conf.py:

    import sys, os
    
    # Sphinx Minimizer [Optional] Options
    image_min_max_width = 1080  # Default
    

Usage

After a build is complete, images in build/_images/ will be compressed (lossless, if png).

Requirements

  • Python>=3.6
  • Sphinx>=1.8
  • pillow>=10.4.0

This may work with older versions, but has not been tested.

Entry Point

See setup(app) definition at sphinx_image_min.py.

Tested in

  • Windows 11 via PowerShell 7
  • Ubuntu 22.04 via ReadTheDocs (RTD) CI

Notes

  • __init__.py is required for both external pathing and to treat the directory as a pkg

Metadata

Release files for sphinx-image-min 1.0.9

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

Source distribution (sdist)

Source distribution for sphinx-image-min 1.0.9
File Size Uploaded
sphinx_image_min-1.0.9.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sphinx-image-min 1.0.9
File Interpreter ABI Platform
sphinx_image_min-1.0.9-py3-none-any.whl Python 3 none any Details

Total release size: 8.5 kB

Release files / sphinx_image_min-1.0.9.tar.gz

Download URL sphinx_image_min-1.0.9.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cb3d1dd81904d04d554671c63a57d9f60ab219453e9a4f3255c7352a3be2c5b1
BLAKE2b-256 checksum
How to use checksums
6a8c534f76435217bbd1f33cba34cd2780afd1746e04835c0d68c5b0cf875e60
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.16

Release files / sphinx_image_min-1.0.9-py3-none-any.whl

Download URL sphinx_image_min-1.0.9-py3-none-any.whl
Size 4.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c23bc0fe88323c819578e86ea359a72156c0caf187b908f690ea7d62c874bba0
BLAKE2b-256 checksum
How to use checksums
65c02573a844947028bda6ee5bed9f57c9ee5bcfb0637b527c79c598403aab95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.10.16

Release history Release notifications | RSS feed

This release

1.0.9 This release

2 release files

1.0.8

2 release files

1.0.7

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