This Sphinx extension allows for automatically minimizing build dir images, most useful when only used for CI.
Project description
Sphinx Extension: Image Minimizer
Description
This Sphinx extension allows for automatically minimizing build dir images, most useful when only used for CI.
Setup
-
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__.pyis required for both external pathing and to treat the directory as a pkg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sphinx_image_min-1.0.8.tar.gz.
File metadata
- Download URL: sphinx_image_min-1.0.8.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
11dd896e2f4b5fe0d0c82855458d2c3a9f687ef178b3d7552fb920f0219ed860
|
|
| MD5 |
4f041d15f6652ac9302f33b49deb8c5f
|
|
| BLAKE2b-256 |
69b5fcd9c0e349dd46ff0c2fd4d0d3888eb1bdee6bad10dc7c18951f9e7d6112
|
File details
Details for the file sphinx_image_min-1.0.8-py3-none-any.whl.
File metadata
- Download URL: sphinx_image_min-1.0.8-py3-none-any.whl
- Upload date:
- Size: 4.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
487a034e156978315c894c02f0b76d47530139928d66e56d639a6e8e89c7f7cb
|
|
| MD5 |
9819a8653cd323a551bcc02830250e2c
|
|
| BLAKE2b-256 |
cb6a6961bdb581db18565e79d96f9e508cd61f7c3eaec59151226b1047e88a0a
|