Metadata-Version: 2.1
Name: sphinxext-photofinish
Version: 0.1.10
Summary: Sphinx Extension that creates responsive images.
Home-page: https://github.com/wpilibsuite/sphinxext-photofinish
Author: WPILib
Author-email: developers@wpilib.org
Classifier: Environment :: Plugins
Classifier: Environment :: Web Environment
Classifier: Framework :: Sphinx :: Extension
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python
Classifier: Topic :: Documentation :: Sphinx
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing
Classifier: Topic :: Utilities
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: sphinx>=2.0
Requires-Dist: beautifulsoup4>=4
Requires-Dist: pillow>=10.0.1
Requires-Dist: tinycss2>=1.1.1

# sphinxext-photofinish

Photofinish is a sphinx extension for creating [responsive](https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images) images to your Sphinx site. This has several benefits:

- Lower bandwidth cost for browsers and devices that don't need the higher resolution version
- Higher resolution images for higher resolution devices

Photofinish can dramatically increase the loading time of your Sphinx website.

## Installation

`python -m pip install sphinxext-photofinish`

## Usage
Just add `sphinxext-photofinish` to your extensions list in your `conf.py`

```python
extensions = [
    "sphinxext.photofinish",
]
```

## Configuration

Photofinish adds several `conf.py` options that you can optionally configure:

`max_viewport_width` - This is maximum "viewable" size of images in your documentation. Typically, it's set to the width of your body. Responsive images are generated up to double of this value. Default is 1000.

`width_min` - Minimum width of images to generate. Default is 500.

`width_step` - The resolution to iterate over for generating images. EX: 500, 800, 1100. Default is 300.

`photofinish_ci_only` - Should this extension only run if the `CI` environment variable is set? Default is False.
